日韩精品一区二区三区高清_久久国产热这里只有精品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程序設計
  • 無相關信息
    合肥生活資訊

    合肥圖文信息
    急尋熱仿真分析?代做熱仿真服務+熱設計優化
    急尋熱仿真分析?代做熱仿真服務+熱設計優化
    出評 開團工具
    出評 開團工具
    挖掘機濾芯提升發動機性能
    挖掘機濾芯提升發動機性能
    海信羅馬假日洗衣機亮相AWE  復古美學與現代科技完美結合
    海信羅馬假日洗衣機亮相AWE 復古美學與現代
    合肥機場巴士4號線
    合肥機場巴士4號線
    合肥機場巴士3號線
    合肥機場巴士3號線
    合肥機場巴士2號線
    合肥機場巴士2號線
    合肥機場巴士1號線
    合肥機場巴士1號線
  • 短信驗證碼 酒店vi設計 deepseek 幣安下載 AI生圖 AI寫作 aippt AI生成PPT 阿里商辦

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

    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>
        亚洲激情视频在线播放| 日韩一级网站| 久久国产精品99国产| 99天天综合性| 久久国产一二区| 国产在线精品成人一区二区三区| 欧美片在线播放| 亚洲国产日韩美| 国产一区欧美| 国产精品视频男人的天堂| 亚洲精品一二三区| 久久精品欧美日韩| 国产欧美日韩麻豆91| 亚洲韩国日本中文字幕| 久久综合九色欧美综合狠狠| 国内揄拍国内精品少妇国语| 伊人婷婷久久| 亚洲成色最大综合在线| 亚洲国产欧美一区二区三区同亚洲| 欧美日韩中国免费专区在线看| 性娇小13――14欧美| 欧美视频在线观看 亚洲欧| 蜜臀久久99精品久久久画质超高清| 影音先锋中文字幕一区| 狠狠色丁香婷综合久久| 亚洲精品资源美女情侣酒店| 欧美一级视频一区二区| 国内揄拍国内精品少妇国语| 久久久欧美精品| 99热免费精品在线观看| 欧美日韩妖精视频| 欧美日韩美女| 一区二区三区国产精品| 欧美网站大全在线观看| 久久精品国产清自在天天线| 蜜乳av另类精品一区二区| 99re成人精品视频| 国产精品二区在线| 国产精品一区二区三区四区| 国产午夜精品一区理论片飘花| 一区二区精品在线观看| 另类天堂视频在线观看| 麻豆国产精品va在线观看不卡| 亚洲三级性片| 在线日韩欧美| 亚洲第一免费播放区| 中文国产亚洲喷潮| 欧美日韩不卡| 欧美午夜视频网站| 亚洲网站在线看| 欧美xxx成人| 亚洲精品一二三区| 欧美全黄视频| 欧美高清视频一区二区三区在线观看| 亚洲国产精品久久人人爱蜜臀| 亚洲欧美日韩国产另类专区| 欧美高清在线观看| 久久一区二区三区超碰国产精品| 一本色道88久久加勒比精品| 狠狠干综合网| 亚洲欧美成人一区二区在线电影| 国产精品一区二区黑丝| 国产精品v一区二区三区| 久久久久国产精品午夜一区| 黄色影院成人| 亚洲无线观看| 欧美日韩网站| 亚洲一级二级在线| 久久久久9999亚洲精品| 国产精品久久久久77777| 伊人成综合网伊人222| 亚洲高清精品中出| 韩国av一区二区三区| 国产日韩欧美自拍| 欧美视频中文一区二区三区在线观看| 欧美主播一区二区三区美女 久久精品人| 亚洲永久网站| 精品91免费| 欧美大胆成人| 欧美日韩精品是欧美日韩精品| 亚洲一区二区免费视频| 亚洲高清久久| 国产精品久久久久久户外露出| 欧美日本国产一区| 亚洲男女自偷自拍图片另类| 午夜欧美电影在线观看| 欧美二区在线观看| 欧美一级午夜免费电影| 国产精品热久久久久夜色精品三区| 国产日本欧洲亚洲| 在线观看中文字幕亚洲| 日韩一区二区免费高清| 国产亚洲一区二区精品| 欧美高清视频www夜色资源网| 一区二区激情视频| 亚洲精品123区| 亚洲五月六月| 欧美一区二区在线看| 午夜欧美不卡精品aaaaa| 国产精品视频xxxx| 亚洲男人的天堂在线aⅴ视频| 欧美成人精品高清在线播放| 宅男噜噜噜66一区二区| 另类国产ts人妖高潮视频| 欧美视频专区一二在线观看| 欧美日韩综合一区| 一区二区高清在线观看| 国产综合av| 欧美欧美午夜aⅴ在线观看| 亚洲欧美日韩精品久久久| 欧美大尺度在线| 欧美日韩国产成人在线| 欧美激情在线有限公司| 国产伦精品一区二区三区在线观看| 一区二区三区在线视频播放| 一区二区国产日产| 国产精品色一区二区三区| 国产精品一区二区在线观看| 欧美性jizz18性欧美| 午夜国产欧美理论在线播放| 可以看av的网站久久看| 久久综合中文字幕| 国产日韩在线视频| 一本大道久久a久久精品综合| 国产综合欧美在线看| 久久久www免费人成黑人精品| 亚洲一区二区三区四区五区午夜| 在线精品国精品国产尤物884a| 国产女精品视频网站免费| 一区二区三区欧美日韩| 欧美亚洲午夜视频在线观看| 亚洲性图久久| 亚洲欧美成人一区二区在线电影| 久久精品国产精品| 国产精品美女久久久久久免费| 亚洲精选91| 欧美大香线蕉线伊人久久国产精品| 亚洲欧美区自拍先锋| 亚洲福利久久| 牛牛精品成人免费视频| 久久国产精品久久久久久久久久| 91久久久一线二线三线品牌| 欧美日韩亚洲综合| 激情欧美国产欧美| 久久美女艺术照精彩视频福利播放| 午夜精品影院在线观看| 性久久久久久久| 欧美日本国产精品| 久久福利毛片| 久久福利电影| 一区二区电影免费观看| 狠狠色综合播放一区二区| 精品88久久久久88久久久| 亚洲一级电影| 亚洲精品视频在线观看网站| 中文无字幕一区二区三区| 在线精品福利| 国产欧美精品一区aⅴ影院| 国产欧美在线观看| 亚洲三级毛片| 麻豆久久久9性大片| 99精品视频免费观看| 欧美日韩 国产精品| 亚洲欧洲在线播放|