日韩精品一区二区三区高清_久久国产热这里只有精品8_天天做爽夜夜做爽_一本岛在免费一二三区

合肥生活安徽新聞合肥交通合肥房產生活服務合肥教育合肥招聘合肥旅游文化藝術合肥美食合肥地圖合肥社保合肥醫院企業服務合肥法律

ECE 4122代做、代寫C++編程語言
ECE 4122代做、代寫C++編程語言

時間:2024-11-12  來源:合肥網hfw.cc  作者:hfw.cc 我要糾錯



ECE 4122/6122 Lab 4: CUDA-based John Conway’s Game of Life
(100 pts)
Category: CUDA
Due: Tuesday November 8th
, 2024 by 11:59 PM
Objective:
Implement a C++ CUDA program to run the Game of Life.
Game Description:
The Game of Life (an example of a cellular automaton) is played on an infinite two-dimensional 
rectangular grid of cells. Each cell can be either alive or dead. The status of each cell changes 
each turn of the game (also called a generation) depending on the statuses of that cell's 8 
neighbors. Neighbors of a cell are cells that touch that cell, either horizontal, vertical, or diagonal 
from that cell.
The initial pattern is the first generation. The second generation evolves from applying the rules 
simultaneously to every cell on the game board, i.e. births and deaths happen simultaneously. 
Afterwards, the rules are iteratively applied to create future generations. For each generation 
of the game, a cell's status in the next generation is determined by a set of rules. These simple 
rules are as follows:
• If the cell is alive, then it stays alive if it has either 2 or 3 live neighbors
• If the cell is dead, then it springs to life only in the case that it has 3 live neighbors
There are, of course, as many variations to these rules as there are different combinations of 
numbers to use for determining when cells live or die. Conway tried many of these different 
variants before settling on these specific rules. Some of these variations cause the populations 
to quickly die out, and others expand without limit to fill up the entire universe, or some large 
portion thereof.
Assignment:
1) Write a C++ application that takes up to 5 command line arguments to dynamically change the 
number of processing threads ( >= 2), cell size, the image size and the type of memory allocation. 
Below is an example
 ./Lab2 -c 5 -x 800 -y 600 -t NORMAL
The flags
-n is the number of threads per block (must be a multiple of **), 
-c is used to denote the “cell size” with cells being square (c >=1), 
-x is the window width, 
-y is the window height
-t is either NORMAL, PINNED, or MANAGED. This is the type of memory to use either normal, 
pinned, or managed.
The grid size used for calculations and display is the (window size)/(cell size).
If one of the flags above is missing then automatically use the defaults:
-n defaults to **
-c defaults to 5
-x and -y default to 800 by 600 respectively.
-t defaults to NORMAL
2) Write your code using three functions: one for the normal memory allocation, one for pinned 
memory allocation, and one for managed memory allocation. 
3) Your code needs to use a random number generator to initially set the individual grid element to 
either “alive” or “dead”. 
4) Your code then runs continuously generating new results until either the window is closed or the 
“Esc” key is pressed. 
5) While your code is running you need to display to a graphics window the current state of the Life 
game. Cells that are alive are white and dead cells are black. You don’t need to draw the dead 
cells.
6) While your code is running you need to constantly output to the console window the processing 
time in microseconds of the last 100 generations of the game and the type of memory allocation. 
Do not include the time it takes to display the results.
For example:
100 generations took ??? microsecs with ** threads per block using Normal memory allocation.
100 generations took ??? microsecs with 64 threads per block using Pinned memory allocation.
100 generations took ??? microsecs with 1024 threads per block using Managed memory allocation.
Turn-In Instructions
Zip up your file(s) into Lab4.zip and upload this zip file on the assignment section of Canvas. 
Grading Rubric:
If a student’s program runs correctly and produces the desired output, the student has the potential to get a 100 
on his or her homework; however, TA’s will look through your code for other elements needed to meet the lab 
requirements. The table below shows typical deductions that could occur. 
AUTOMATIC GRADING POINT DEDUCTIONS PER PROBLEM: 
Element Percentage 
Deduction 
Details 
Does Not Compile 40% Code does not compile on PACE-ICE!
Does Not Match Output Up to **% The code compiles but does not produce correct outputs.
Runtime and efficiency of 
code setup
Up to 10% 
extra credit
Top quartile 10 pts, Second quartile 5 pts, Third quartile 2 pts.
Clear Self-Documenting 
Coding Styles 
Up to 25% This can include incorrect indentation, using unclear variable names, 
unclear/missing comments, or compiling with warnings. (See 
Appendix A) 
LATE POLICY 
Element Percentage Deduction Details 
Late Deduction Function score – 0.5 * H H = number of hours (ceiling function) passed 
deadline 
Appendix A: Coding Standards
Indentation:
When using if/for/while statements, make sure you indent 4 spaces for the content inside those. Also make 
sure that you use spaces to make the code more readable.
For example:
for (int i; i < 10; i++) 
{
 j = j + i; 
}
If you have nested statements, you should use multiple indentions. Each { should be on its own line (like the 
for loop) If you have else or else if statements after your if statement, they should be on their own line. 
for (int i; i < 10; i++) 

 if (i < 5)
 {
 counter++; 
 k -= i; 
 } 
 else
 { 
 k +=1;
 } 
 j += i;
}
Camel Case:
This naming convention has the first letter of the variable be lower case, and the first letter in each new word 
be capitalized (e.g. firstSecondThird). 
This applies for functions and member functions as well! 
The main exception to this is class names, where the first letter should also be capitalized. 
Variable and Function Names:
Your variable and function names should be clear about what that variable or function represents. Do not use 
one letter variables, but use abbreviations when it is appropriate (for example: “imag" instead of 
“imaginary”). The more descriptive your variable and function names are, the more readable your code will 
be. This is the idea behind self-documenting code. 
File Headers:
Every file should have the following header at the top
/*
Author: your name
Class: ECE4122 or ECE6122 (section)
Last Date Modified: date
Description:
What is the purpose of this file?
*/
Code Comments:
1. Every function must have a comment section describing the purpose of the function, the input and 
output parameters, the return value (if any).
2. Every class must have a comment section to describe the purpose of the class.
3. Comments need to be placed inside of functions/loops to assist in the understanding of the flow of 
the code.

請加QQ:99515681  郵箱:99515681@qq.com   WX:codinghelp







 

掃一掃在手機打開當前頁
  • 上一篇:CSC1003 代做、JAVA 語言編程代寫
  • 下一篇:代寫COMP0034、代做Java/Python程序設計
  • 無相關信息
    合肥生活資訊

    合肥圖文信息
    2025年10月份更新拼多多改銷助手小象助手多多出評軟件
    2025年10月份更新拼多多改銷助手小象助手多
    有限元分析 CAE仿真分析服務-企業/產品研發/客戶要求/設計優化
    有限元分析 CAE仿真分析服務-企業/產品研發
    急尋熱仿真分析?代做熱仿真服務+熱設計優化
    急尋熱仿真分析?代做熱仿真服務+熱設計優化
    出評 開團工具
    出評 開團工具
    挖掘機濾芯提升發動機性能
    挖掘機濾芯提升發動機性能
    海信羅馬假日洗衣機亮相AWE  復古美學與現代科技完美結合
    海信羅馬假日洗衣機亮相AWE 復古美學與現代
    合肥機場巴士4號線
    合肥機場巴士4號線
    合肥機場巴士3號線
    合肥機場巴士3號線
  • 短信驗證碼 trae 豆包網頁版入口 目錄網 排行網

    關于我們 | 打賞支持 | 廣告服務 | 聯系我們 | 網站地圖 | 免責聲明 | 幫助中心 | 友情鏈接 |

    Copyright © 2025 hfw.cc Inc. All Rights Reserved. 合肥網 版權所有
    ICP備06013414號-3 公安備 42010502001045

    日韩精品一区二区三区高清_久久国产热这里只有精品8_天天做爽夜夜做爽_一本岛在免费一二三区

      <em id="rw4ev"></em>

        <tr id="rw4ev"></tr>

        <nav id="rw4ev"></nav>
        <strike id="rw4ev"><pre id="rw4ev"></pre></strike>
        久久最新视频| 亚洲国产精品久久人人爱蜜臀| 麻豆成人在线| 亚洲黄色大片| 久久精品五月婷婷| 国内偷自视频区视频综合| 国产精品久久毛片a| 亚洲欧美日韩国产综合| 国产主播一区二区| 亚洲国产你懂的| 亚洲天堂视频在线观看| 国产热re99久久6国产精品| 玖玖玖国产精品| 欧美日韩一二区| 久久国产精品久久国产精品| 欧美日韩一区在线观看| 老司机午夜免费精品视频| 国产精品国产三级国产普通话蜜臀| 欧美人交a欧美精品| 欧美精品在线一区二区| 欧美影片第一页| 亚洲精品美女久久7777777| 亚洲人成在线影院| 在线视频亚洲| 久久国内精品自在自线400部| 亚洲欧洲在线视频| 亚洲黄色影院| 国产精品成人免费精品自在线观看| 亚洲免费在线电影| 国产亚洲女人久久久久毛片| 国内视频精品| 欧美在线免费观看亚洲| 老司机一区二区三区| 欧美主播一区二区三区美女 久久精品人| aa级大片欧美三级| 亚洲国产综合91精品麻豆| 精品福利免费观看| 欧美色精品天天在线观看视频| 国产亚洲人成a一在线v站| 国产女同一区二区| 亚洲欧洲久久| 亚洲香蕉伊综合在人在线视看| 亚洲精品美女在线观看播放| 久久婷婷亚洲| 久久成人精品一区二区三区| 欧美色123| 性xx色xx综合久久久xx| 亚洲人人精品| 久久婷婷麻豆| 国产精品一国产精品k频道56| 久久综合国产精品台湾中文娱乐网| 欧美三级电影大全| 亚洲人成网站999久久久综合| 久久综合激情| 亚洲一区在线视频| 国产精品日韩二区| 在线综合亚洲| 亚洲裸体俱乐部裸体舞表演av| 欧美日韩精品综合在线| 精品成人一区二区三区四区| 欧美福利网址| 亚洲精品韩国| 亚洲美女色禁图| 久久久久久高潮国产精品视| 亚洲已满18点击进入久久| 亚洲国产欧美一区二区三区丁香婷| 亚洲美女色禁图| 国产亚洲福利| 欧美日韩大片| 欧美日韩欧美一区二区| 亚洲精品久久久久久久久久久| 欧美午夜在线| 亚洲国产精品va在线看黑人动漫| 国产日本亚洲高清| 国产欧美va欧美va香蕉在| 国产亚洲精品高潮| 欧美日韩一区二区三区高清| 欧美—级高清免费播放| 国产婷婷色一区二区三区在线| 激情综合中文娱乐网| 欧美日韩一区二区三区在线观看免| 欧美一区国产二区| 久久精品国亚洲| 亚洲精品偷拍| 亚洲福利视频免费观看| 一区二区日本视频| 亚洲欧美日韩国产一区| 欧美日韩一区二区免费在线观看| 欧美视频精品在线观看| 久久久久久亚洲精品中文字幕| 国产日韩精品一区二区| 国产丝袜一区二区| 欧美成人高清视频| 欧美日韩高清一区| 国产精品午夜国产小视频| 久久精品国产69国产精品亚洲| 在线精品福利| 一区在线播放视频| 一本高清dvd不卡在线观看| 欧美日韩亚洲综合一区| 久久国产精品久久久久久电车| 欧美影院久久久| 欧美激情欧美激情在线五月| 欧美精品国产| 久久久免费av| 欧美午夜宅男影院在线观看| 国产精品视频xxxx| 亚洲人成网站影音先锋播放| 国产一区二区三区四区在线观看| 国产精品啊啊啊| 亚洲特色特黄| 久久精品中文字幕一区二区三区| 中文在线资源观看视频网站免费不卡| 欧美精品日日鲁夜夜添| 最新高清无码专区| 国产女人aaa级久久久级| 亚洲精品黄网在线观看| 在线观看国产日韩| 亚洲无亚洲人成网站77777| 日韩小视频在线观看| 999亚洲国产精| 欧美调教vk| 欧美一区三区二区在线观看| 久久久www| 亚洲精品中文字幕有码专区| 国产精品日韩欧美一区二区三区| 欧美视频第二页| 欧美激情va永久在线播放| 精品动漫一区二区| 国产一区二区三区免费不卡| 午夜日韩视频| 亚洲一区二区三区四区在线观看| 一本色道久久99精品综合| 国产中文一区| 久久久久久**毛片大全| 亚洲电影免费观看高清完整版在线| 久久精品日韩| 亚洲精品久久久一区二区三区| 国产精品无码专区在线观看| 美日韩在线观看| 国产亚洲欧美中文| 性色av一区二区三区红粉影视| 欧美黄免费看| 久久久亚洲影院你懂的| 欧美日韩国产美| 欧美激情综合五月色丁香小说| 国产精品国产三级国产aⅴ浪潮| 伊人成人开心激情综合网| 国产日韩精品一区二区浪潮av| 久久国产主播精品| 欧美激情一区二区三区在线| 午夜性色一区二区三区免费视频| 亚洲欧美一区二区精品久久久| 久久经典综合| 久久精品成人| 亚洲美女中文字幕| 欧美日韩专区在线| 国产区欧美区日韩区| 国产在线高清精品| 国产日韩在线播放| 欧美午夜寂寞影院| 亚洲精品视频在线| 亚洲国产成人精品久久| 性欧美xxxx大乳国产app|