BookList1--Compute Graph

本文精选了多部计算机图形学领域的经典著作,包括《计算机图形学(第三版)》、《计算机真实感图形的算法基础》等,涵盖了从理论到实践的多个方面,适合不同层次的学习者和技术人员阅读。

ComputeGraph :

《计算机图形学(第三版)》电子工业出版社
author : Donald Hearn
Computer Graphics with OpenGL, 3e

计算机真实感图形的算法基础

实时计算机图形学(第2版)
(本书获得2002年度美国《游戏开发者》杂志的“前沿奖”)

《中国计算机图形学进展2006-第六届中国计算机图形学大会论文集》
作者: 彭群生

SIGGRAPH 2006 SCI Paper Address
http://www.cs.brown.edu/~tor/sig2006.htm 

Module 11 Graphs and Traversals Application Programming Assignment This Programming Assignment is based on Application Exercise 13.8.39: Describe an efficient algorithm that given a network of n stations connected by m high-speed connection links, represented by a graph, it computes, for each station, the set of stations it can reach using no more than four links. Describe the problem in terms of input and expected output clearly. Develop a program that accepts a network G of n switching stations connected by m high speed links, it will output for each station, the set of stations it can reach using no more than four links. Clearly specify all data structures and their implementations used to program the solution. In your submission, you must upload two files: Submit a typed Word or PDF document with description of your solution on LUMINA. Your answers should be very clear, in proper order, and use complete sentences. Review your work several times before submission to be sure the steps of the algorithm are clearly and properly stated and in the correct order. Provide pseudocode for the main algorithms, except for user interface, input/output, etc. Submit a single zip file named Telephone_ Network_Lastname.zip containing the code file and test files. Here are some further guidelines for programming code: Use an OOP language, such as Java, Python or C++. Comment your code. Your code file must compile and accept any number of inputs in the format you specified. You need to design an efficient algorithm which will run in O(n + m) running time that computes for each station, the set of stations it can reach using with maximum 4 links. This can be implemented by using the algorithms mentioned in the text book. Below is the input/output format we will consider for grading: Input: n = number of stations m = number of communication links List of 'm' pairs which represents link between stations Output: From each station list of stations that can be reached using no more than 4 links from each station From the input, you can construct a graph and perform your algorithm to find out a path for each station to reach all of the stations using no more than 4 links. Example Test cases: #Case-1 Input: n = 8 m = 10 links = [(0, 1), (1, 2), (1, 3), (2, 4), (2, 5), (3, 6), (3, 7), (4, 5), (5, 6), (6, 7)] Output: Reachable stations from station 0: {0, 1, 2, 3, 4, 5, 6, 7} Reachable stations from station 1: {0, 1, 2, 3, 4, 5, 6, 7} Reachable stations from station 2: {0, 1, 2, 3, 4, 5, 6, 7} Reachable stations from station 3: {0, 1, 2, 3, 4, 5, 6, 7} Reachable stations from station 4: {0, 1, 2, 3, 4, 5, 6, 7} Reachable stations from station 5: {0, 1, 2, 3, 4, 5, 6, 7} Reachable stations from station 6: {0, 1, 2, 3, 4, 5, 6, 7} Reachable stations from station 7: {0, 1, 2, 3, 4, 5, 6, 7} #Case-2 Input: n = 5 m = 4 connections = [(0, 1), (1, 2), (2, 3), (3, 4)] Output: Reachable stations from station 0: {0, 1, 2, 3, 4} Reachable stations from station 1: {0, 1, 2, 3, 4} Reachable stations from station 2: {0, 1, 2, 3, 4} Reachable stations from station 3: {0, 1, 2, 3, 4} Reachable stations from station 4: {0, 1, 2, 3, 4} This format needs to be followed while presenting your code. You can include Doctests or sample test cases in a separate text document which needs to be in the zip file Telephone_ Network_Lastname.zip.
08-25
### 如何使用 `nvidia-smi --query-compute-apps` 查询 GPU 上运行的应用程序 可以利用命令 `nvidia-smi --query-compute-apps` 来查询当前 GPU 上正在运行的应用程序及其资源占用情况。此功能能够提供有关每个应用程序的详细信息,例如进程 ID(PID)、显存使用量以及计算模式等[^4]。 以下是具体的实现方式: #### 使用方法 通过以下命令来获取 GPU 上运行的应用程序的信息: ```bash nvidia-smi --query-compute-apps=pid,used_memory,gpu_name --format=csv ``` 上述命令中包含了三个主要字段: - **pid**: 表示运行在 GPU 上的进程 ID。 - **used_memory**: 显示该进程中已使用的显存量,单位通常为 MiB 或者其他指定单位。 - **gpu_name**: 返回对应的 GPU 设备名称。 如果希望输出更加简洁或者调整列顺序,则可以根据需求自定义查询参数列表。比如仅关注 PID 和内存消耗时可执行如下指令: ```bash nvidia-smi --query-compute-apps=pid,used_memory --format=csv,nounits ``` 这里增加了选项 `nounits` 用于去掉单位以便于后续处理数据[^1]。 另外需要注意的是,在某些情况下可能会遇到权限不足的问题导致无法正常读取所有必要的信息。此时建议以超级用户身份重新尝试操作,即加上前缀 `sudo` 执行前述任意一条命令[^3]。 最后提醒一点,当环境中存在多个不同类型的 GPUs 时,返回的结果也会区分不同的设备分别列举出来,方便管理员针对特定硬件做进一步优化配置[^2]。 ### 示例代码展示 下面给出一段简单的脚本用来定期记录这些动态变化的数据至本地文件当中保存起来供以后分析用: ```bash #!/bin/bash LOGFILE="gpu_apps_usage_$(date +%Y%m%d).log" while true; do echo "$(date): Current running apps:" >> $LOGFILE nvidia-smi --query-compute-apps=pid,name,used_memory --format=csv,noheader >> $LOGFILE sleep 5 # Adjust interval as needed. done ``` 以上脚本每隔五秒钟就会把当前时刻下各个应用的基本概况追加写入日志文档里去。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值