国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看

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

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程序設計
  • 無相關信息
    合肥生活資訊

    合肥圖文信息
    流體仿真外包多少錢_專業CFD分析代做_友商科技CAE仿真
    流體仿真外包多少錢_專業CFD分析代做_友商科
    CAE仿真分析代做公司 CFD流體仿真服務 管路流場仿真外包
    CAE仿真分析代做公司 CFD流體仿真服務 管路
    流體CFD仿真分析_代做咨詢服務_Fluent 仿真技術服務
    流體CFD仿真分析_代做咨詢服務_Fluent 仿真
    結構仿真分析服務_CAE代做咨詢外包_剛強度疲勞振動
    結構仿真分析服務_CAE代做咨詢外包_剛強度疲
    流體cfd仿真分析服務 7類仿真分析代做服務40個行業
    流體cfd仿真分析服務 7類仿真分析代做服務4
    超全面的拼多多電商運營技巧,多多開團助手,多多出評軟件徽y1698861
    超全面的拼多多電商運營技巧,多多開團助手
    CAE有限元仿真分析團隊,2026仿真代做咨詢服務平臺
    CAE有限元仿真分析團隊,2026仿真代做咨詢服
    釘釘簽到打卡位置修改神器,2026怎么修改定位在范圍內
    釘釘簽到打卡位置修改神器,2026怎么修改定
  • 短信驗證碼 豆包網頁版入口 破天一劍 目錄網 排行網

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

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

    国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看
    国产日韩专区在线| 91国内在线视频| 国产精品都在这里| 日韩中文字幕免费看| 久久久日本电影| av无码久久久久久不卡网站| 国模无码视频一区二区三区| 欧美一级中文字幕| 亚洲综合在线中文字幕| 伊人色综合久久天天五月婷| 亚洲国产精品一区二区第四页av | 国产精品亚洲综合天堂夜夜| 国产三区精品| 国产精品自拍片| 7777精品视频| 久久免费精品日本久久中文字幕| 国产欧美精品xxxx另类| 国产乱码精品一区二区三区卡| 国产系列第一页| 国产美女精品视频免费观看| 97精品国产97久久久久久春色| 国产福利精品av综合导导航| 久久久国产精彩视频美女艺术照福利| 国产精品成人免费视频| 亚洲国产精品久久久久爰色欲 | 免费一级特黄特色毛片久久看| 国内精品久久久久久影视8| 国内精品久久影院| av色综合网| 久久精彩免费视频| 亚洲日本精品一区| 欧美激情 国产精品| 国产精品一二三在线观看| 久久青青草综合| 国产精品久久久久久久久| 亚洲精品国产系列| 国内精品**久久毛片app| 91精品综合久久| 国产精品第100页| 婷婷五月色综合| 国产一区二区三区小说| 久久日韩精品| 色综合久久中文字幕综合网小说| 日韩免费高清在线| 91久久久久久久久| 久久国产精品久久久| 热99在线视频| 国产第一区电影| 亚洲一区二区三区乱码| 操人视频欧美| 中文字幕免费高| 国产熟女高潮视频| 欧美猛少妇色xxxxx| 男人天堂av片| 久久久噜久噜久久综合| 日本一区视频在线观看| 久久精品香蕉视频| www日韩在线观看| 欧美激情精品久久久久久黑人 | 久久最新免费视频| 大j8黑人w巨大888a片| 国产精品12| 日韩中文字幕三区| 日韩一区二区在线视频| 人妻久久久一区二区三区| 日韩视频免费在线| 日韩精品第一页| 精品国产一区二区三区在线观看| 激情视频在线观看一区二区三区| 欧美精品在线播放| 777精品视频| 欧美主播一区二区三区美女 久久精品人 | 国产成人久久久精品一区| 欧美亚洲国产日韩2020| 欧美精品制服第一页| 国产精品香蕉av| 欧美一区少妇| 亚洲免费av网| 久久男人av资源网站| 欧日韩免费视频| 久国内精品在线| 久草精品在线播放| 黄色一级视频播放| 亚洲精品一区二区三区av| 日韩在线观看你懂的| 国产在线日韩在线| 欧美一区二区三区在线播放| 国产精品视频免费一区二区三区 | 免费在线观看毛片网站| 中文精品视频一区二区在线观看| 欧美精品999| 久久亚洲精品欧美| 精品人妻一区二区三区四区在线| 一区二区三区四区久久| 久久综合伊人77777蜜臀| 成人欧美一区二区| 欧美精品在欧美一区二区| 午夜在线视频免费观看| 国产精品美女久久| 久久伦理网站| caoporn国产精品免费公开| 欧美日韩亚洲一区二区三区在线观看| 亚洲在线观看视频网站| 国产精品久久久久99| 久久精品国产精品亚洲| 久久免费在线观看| 国产欧美一区二区视频| 国产综合视频在线观看| 日本在线播放一区| 午夜精品一区二区在线观看的| 欧美日韩国产成人| 欧美成年人视频| 国产成人久久久精品一区| 久久久亚洲网站| 国产成人在线一区| 国产成人综合精品| 久久精品.com| 久久久免费av| 播播国产欧美激情| 色偷偷88888欧美精品久久久| 久久精品女人的天堂av| 91av免费看| 91福利视频在线观看| 国产传媒一区二区| 国产精品视频成人| 国产精品福利视频| 欧美精品在线视频观看| 久久99精品久久久久久青青91| 欧美精品在线免费观看| 精品国产乱码久久久久| 宅男噜噜99国产精品观看免费| 在线一区高清| 日韩不卡视频一区二区| 欧美亚洲日本黄色| 精品一区二区不卡| 91久久夜色精品国产网站| 国产精品91视频| 久久精品视频91| 操91在线视频| 日韩a∨精品日韩在线观看| 欧美激情www| 91精品天堂| 久热精品在线视频| 日日摸天天爽天天爽视频| 免费在线一区二区| 久久久最新网址| 欧美成人亚洲成人| 视频一区视频二区视频| 国产日韩欧美中文| 久久免费视频2| 夜夜爽www精品| 欧美牲交a欧美牲交aⅴ免费真| 成人欧美一区二区| 精品国产一区二区三区麻豆小说 | 国产在线拍揄自揄视频不卡99| 国产精品99蜜臀久久不卡二区| 久久精品国产2020观看福利| 亚洲国产精品久久久久婷蜜芽 | 久久一区免费| 日韩欧美精品在线不卡| 97精品一区二区视频在线观看| 在线观看日本一区| 久久综合一区| 亚洲精品免费网站| 91成人免费视频| 日本视频久久久| 久草资源站在线观看| 欧美日韩激情视频在线观看| 国产精品免费成人| 国产偷人视频免费| 欧美成人一区在线| 国产亚洲欧美在线视频| 一区二区在线不卡| 久久综合色视频| 黄色91av| 亚洲精品成人久久久998| 久久久噜噜噜久久| 国产一级二级三级精品| 久久久久久久久中文字幕| 亚洲一区二区在线看| 色偷偷av亚洲男人的天堂| 99视频精品免费| 热久久这里只有| 一本色道久久综合亚洲二区三区| 国产xxxxx视频| 成人黄色一区二区| 日韩欧美在线免费观看视频| 久久这里有精品| 91精品久久久久久久久青青| 青青视频在线播放| 一区二区三区免费看| 久久99精品久久久久久久久久| 男女午夜激情视频| 国产精品入口福利| 国产极品尤物在线| www.日本少妇| 国产欧美一区二区三区不卡高清| 亚洲97在线观看| 懂色av一区二区三区四区五区| 一本久道中文无码字幕av|