caimmetal03.key
|
|
- せせら つまがみ
- 4 years ago
- Views:
Transcription
1
2
3
4 import UIKit // ID let ID_VERTEX:Int = 0 let ID_PROJECTION:Int = 1 // 1 struct VertexInfo : Initializable { var pos:vec4 = Vec4() var uv:vec2 = Vec2() var rgba:caimcolor = CAIMColor() // struct Particle { var pos:vec2 = Vec2() var radius:float = 0.0 var rgba:caimcolor = CAIMColor() var life:float = 0.0 // xy // // // (1.0~0.0) // CAIM-Metal class DrawingViewController : CAIMMetalViewController { private var pl_circle:caimmetalrenderpipeline? // GPU: private var mat_buf:caimmetalbuffer? private var circle_quads_buf:caimmetalbuffer? // // () // CPU: private var circle_quads = CAIMQuadrangles<VertexInfo>() // // private var circle_parts = [Particle]() () //
5 () // private func setupcircles() { // pl_circle = CAIMMetalRenderPipeline(vertname:"vert2d", fragname:"fragcirclecoscurve") pl_circle?.blend_type =.alpha_blend // (GPU)() circle_quads_buf = CAIMMetalBuffer(vertice:circle_quads) // let wid:float = Float(CAIMScreenPixel.width) let hgt:float = Float(CAIMScreenPixel.height) for _ in 0..< 100 { var p:particle = Particle() p.pos = Vec2(CAIMRandom(wid), CAIMRandom(hgt)) p.rgba = CAIMColor(R: CAIMRandom(), G: CAIMRandom(), B: CAIMRandom(), A: CAIMRandom()) p.radius = CAIMRandom(100.0) p.life = CAIMRandom() circle_parts.append(p) override func setup() { // (GPU)() () mat_buf = CAIMMetalBuffer(Matrix4x4.pixelProjection(CAIMScreenPixel)) // setupcircles()
6 () // private func updatecircles() { // let wid:float = Float(CAIMScreenPixel.width) let hgt:float = Float(CAIMScreenPixel.height) for i:int in 0..< circle_parts.count { // (3) () circle_parts[i].life -= 1.0 / (3.0 * 60.0) // 0 if(circle_parts[i].life <= 0.0) { circle_parts[i].pos = Vec2(CAIMRandom(wid), CAIMRandom(hgt)) circle_parts[i].rgba = CAIMColor(R: CAIMRandom(), G: CAIMRandom(), B: CAIMRandom(), A: CAIMRandom()) circle_parts[i].radius = CAIMRandom(100.0) circle_parts[i].life = 1.0
7 () // CPUGPU private func gencirclesbuffer() { // CPU(circle_parts -> circle_quads) circle_quads.resize(count: circle_parts.count) let p_circle_quads = circle_quads.pointer for i:int in 0..< circle_quads.count { // let p:particle = circle_parts[i] let x:float = p.pos.x let y:float = p.pos.y // x // y let r:float = p.radius * (1.0 - p.life) // () var rgba:caimcolor = p.rgba rgba.a *= p.life // // () // v0 p_circle_quads[i].v0.pos = Vec4(x-r, y-r, 0, 1) p_circle_quads[i].v0.uv = Vec2(-1.0, -1.0) p_circle_quads[i].v0.rgba = rgba // v1 p_circle_quads[i].v1.pos = Vec4(x+r, y-r, 0, 1) p_circle_quads[i].v1.uv = Vec2(1.0, -1.0) p_circle_quads[i].v1.rgba = rgba // v2 p_circle_quads[i].v2.pos = Vec4(x-r, y+r, 0, 1) p_circle_quads[i].v2.uv = Vec2(-1.0, 1.0) p_circle_quads[i].v2.rgba = rgba // v3 p_circle_quads[i].v3.pos = Vec4(x+r, y+r, 0, 1) p_circle_quads[i].v3.uv = Vec2(1.0, 1.0) p_circle_quads[i].v3.rgba = rgba // GPU(circle_quads -> circle_quads_buf) circle_quads_buf?.update(vertice: circle_quads) ()
8 () // private func drawcircles(renderer:caimmetalrenderer) { // () renderer.use(pl_circle) // renderer.link(circle_quads_buf!, to:.vertex, at:id_vertex) renderer.link(mat_buf!, to:.vertex, at:id_projection) // GPU(circle_quads) renderer.draw(circle_quads) // override func update(renderer:caimmetalrenderer) { // updatecircles() // GPU gencirclesbuffer() // drawcircles(renderer: renderer)
9 () // ID constant int ID_VERTEX = 0; constant int ID_PROJECTION = 1; // struct VertexIn { packed_float4 pos; packed_float2 uv; packed_float4 rgba; ; // struct VertexOut { float4 pos [[position]]; float2 uv; float4 rgba; ; // (2D) vertex VertexOut vert2d(device VertexIn *vin [[ buffer(id_vertex) ]], constant float4x4 &proj_matrix [[ buffer(id_projection) ]], uint vid [[vertex_id]]) { VertexOut vout; vout.pos = proj_matrix * float4(vin[vid].pos); vout.uv = vin[vid].uv; vout.rgba = vin[vid].rgba; return vout; // (Cos) fragment float4 fragcirclecoscurve(vertexout vout [[ stage_in ]]) { // uv float dist2 = vout.uv[0] * vout.uv[0] + vout.uv[1] * vout.uv[1]; // uv1.0 = (discard_fragment()) if(dist2 >= 1.0) { discard_fragment(); // float4 rgba = vout.rgba; rgba[3] = vout.rgba[3] * (1.0 + cos(m_pi_f * dist2)) / 2.0; return rgba;
10
11
12 import UIKit () // CAIM-Metal class DrawingViewController : CAIMMetalViewController { private var pl_circle:caimmetalrenderpipeline? // private var pl_ring:caimmetalrenderpipeline? // // GPU: private var mat_buf:caimmetalbuffer? private var circle_quads_buf:caimmetalbuffer? private var ring_quads_buf:caimmetalbuffer? // // () // () // CPU: private var circle_quads = CAIMQuadrangles<VertexInfo>() private var ring_quads = CAIMQuadrangles<VertexInfo>() // // // private var circle_parts = [Particle]() // private var ring_parts = [Particle]() // ()
13 () private func setupcircles() { // private func setuprings() { // pl_ring = CAIMMetalRenderPipeline(vertname:"vert2d", fragname:"fragring") pl_ring?.blend_type =.alpha_blend // (GPU)() ring_quads_buf = CAIMMetalBuffer(vertice:ring_quads) // let wid:float = Float(CAIMScreenPixel.width) let hgt:float = Float(CAIMScreenPixel.height) for _ in 0..< 100 { var p:particle = Particle() p.pos = Vec2(CAIMRandom(wid), CAIMRandom(hgt)) p.rgba = CAIMColor(R: CAIMRandom(), G: CAIMRandom(), B: CAIMRandom(), A: CAIMRandom()) p.radius = CAIMRandom(100.0) p.life = CAIMRandom() ring_parts.append(p) override func setup() { // (GPU)() mat_buf = CAIMMetalBuffer(Matrix4x4.pixelProjection(CAIMScreenPixel)) // setupcircles() // setuprings() ()
14 () // private func updaterings() { // let wid:float = Float(CAIMScreenPixel.width) let hgt:float = Float(CAIMScreenPixel.height) // for i:int in 0..< ring_parts.count { // (3) () ring_parts[i].life -= 1.0 / (3.0 * 60.0) // 0 if(ring_parts[i].life <= 0.0) { ring_parts[i].pos = Vec2(CAIMRandom(wid), CAIMRandom(hgt)) ring_parts[i].rgba = CAIMColor(R: CAIMRandom(), G: CAIMRandom(), B: CAIMRandom(), A: CAIMRandom()) ring_parts[i].radius = CAIMRandom(100.0) ring_parts[i].life = 1.0
15 () // CPUGPU private func genringsbuffer() { // CPU(parts -> quads) ring_quads.resize(count: ring_parts.count) let p_ring_quads = ring_quads.pointer for i:int in 0..< ring_quads.count { // let p:particle = ring_parts[i] let x:float = p.pos.x let y:float = p.pos.y // x // y let r:float = p.radius * (1.0 - p.life) // () var rgba:caimcolor = p.rgba rgba.a *= p.life // // () // v0 p_ring_quads[i].v0.pos = Vec4(x-r, y-r, 0, 1) p_ring_quads[i].v0.uv = Vec2(-1.0, -1.0) p_ring_quads[i].v0.rgba = rgba // v1 p_ring_quads[i].v1.pos = Vec4(x+r, y-r, 0, 1) p_ring_quads[i].v1.uv = Vec2(1.0, -1.0) p_ring_quads[i].v1.rgba = rgba // v2 p_ring_quads[i].v2.pos = Vec4(x-r, y+r, 0, 1) p_ring_quads[i].v2.uv = Vec2(-1.0, 1.0) p_ring_quads[i].v2.rgba = rgba // v3 p_ring_quads[i].v3.pos = Vec4(x+r, y+r, 0, 1) p_ring_quads[i].v3.uv = Vec2(1.0, 1.0) p_ring_quads[i].v3.rgba = rgba // GPU(quads -> quads_buf) ring_quads_buf?.update(vertice: ring_quads) ()
16 () // private func drawrings(renderer:caimmetalrenderer) { // () renderer.use(pl_ring) // renderer.link(ring_quads_buf!, to:.vertex, at:id_vertex) renderer.link(mat_buf!, to:.vertex, at:id_projection) // GPU(ring_quads) renderer.draw(ring_quads) // override func update(renderer:caimmetalrenderer) { // updatecircles() // GPU gencirclesbuffer() // drawcircles(renderer: renderer) // updaterings() // GPU genringsbuffer() // drawrings(renderer: renderer)
17 () // (2D) vertex VertexOut vert2d(device VertexIn *vin [[ buffer(id_vertex) ]], constant float4x4 &proj_matrix [[ buffer(id_projection) ]], uint vid [[vertex_id]]) { () // (Cos) fragment float4 fragcirclecoscurve(vertexout vout [[ stage_in ]]) { () // () fragment float4 fragring(vertexout vout [[ stage_in ]]) { // uv float dist2 = vout.uv[0] * vout.uv[0] + vout.uv[1] * vout.uv[1]; // uv float dist = sqrt(dist2); // uv0.81.0() if(dist <= <= dist) { discard_fragment(); // dist2=0.9k10k=0.0~1.0 // kcos float k = fabs(0.9 - dist) * 10.0; // float4 rgba = vout.rgba; rgba[3] = vout.rgba[3] * (1.0 + cos(m_pi_f * k)) / 2.0; return rgba;
18
caimmetal03.key
import UIKit import simd // ID let ID_VERTEX:Int = 0 let ID_PROJECTION:Int = 1 // 1 struct Vertex { var pos:float2 = Float2() var uv:float2 = Float2() var rgba:float4 = Float4() // struct Particle { var
More informationcaim04
CAIM03ImageToolBox.swiftCAIM04_1ImageToolBox.swift Command+A() Command+C() CAIM04_1ImageToolBox.swift Command+V( ImageToolBox.fillCircle import Foundation // class ImageToolBox { ) // () static func fillcircle(_
More informationcaim03
ImageToolBox.swift fillrect fillcolor x1,y1,x2,y2 static func fillrect(_ img:caimimage, x1:int, y1:int, x2:int, y2:int, color:caimcolor) { // let mat = img.matrix // let wid = img.width // let hgt = img.height
More informationuntitled
20 7 1 22 7 1 1 2 3 7 8 9 10 11 13 14 15 17 18 19 21 22 - 1 - - 2 - - 3 - - 4 - 50 200 50 200-5 - 50 200 50 200 50 200 - 6 - - 7 - () - 8 - (XY) - 9 - 112-10 - - 11 - - 12 - - 13 - - 14 - - 15 - - 16 -
More informationuntitled
19 1 19 19 3 8 1 19 1 61 2 479 1965 64 1237 148 1272 58 183 X 1 X 2 12 2 15 A B 5 18 B 29 X 1 12 10 31 A 1 58 Y B 14 1 25 3 31 1 5 5 15 Y B 1 232 Y B 1 4235 14 11 8 5350 2409 X 1 15 10 10 B Y Y 2 X 1 X
More informationcaim03
ImageToolBox.swift fillrect fillcolor x1,y1,x2,y2 static func fillrect(_ img:caimimage, x1:int, y1:int, x2:int, y2:int, color:caimcolor) { // let mat = img.matrix // let wid = img.width // let hgt = img.height
More information- 1 - - 0.5%5 10 10 5 10 1 5 1
- - - 1 - - 0.5%5 10 10 5 10 1 5 1 - 2 - - - - A B A A A B A B B A - 3 - - 100 100 100 - A) ( ) B) A) A B A B 110 A B 13 - 4 - A) 36 - - - 5 - - 1 - 6-1 - 7 - - 8 - Q.15 0% 10% 20% 30% 40% 50% 60% 70%
More information3.1 stdio.h iostream List.2 using namespace std C printf ( ) %d %f %s %d C++ cout cout List.2 Hello World! cout << float a = 1.2f; int b = 3; cout <<
C++ C C++ 1 C++ C++ C C++ C C++? C C++ C *.c *.cpp C cpp VC C++ 2 C++ C++ C++ [1], C++,,1999 [2],,,2001 [3], ( )( ),,2001 [4] B.W. /D.M.,, C,,1989 C Web [5], http://kumei.ne.jp/c_lang/ 3 Hello World Hello
More informationNPCA部誌2018
1 ARKit 73 object 1.1 73 ( 1) object ARKit 1.2 ARKit ARKit AR AR AR AR( ) (Wikipedia ) AR Pokemon GO( ) AR 1 1.2 ARKit 1.1: VR AR VR VR AR ( ) ( ) ARKit AR ARKit ARKit Apple ios AR ARKit AR ios ios AR
More informationN 体問題 長岡技術科学大学電気電子情報工学専攻出川智啓
N 体問題 長岡技術科学大学電気電子情報工学専攻出川智啓 今回の内容 天体の運動方程式 天体運動の GPU 実装 最適化による性能変化 #pragma unroll 855 計算の種類 画像処理, 差分法 空間に固定された観測点を配置 観測点 ( 固定 ) 観測点上で物理量がどのように変化するかを追跡 Euler 型 多粒子の運動 観測点を配置せず, 観測点が粒子と共に移動 Lagrange 型 観測点
More informationDiMP Users Manual Yuichi Tazaki
DiMP Users Manual Yuichi Tazaki 3 1 5 2 7 2.1............................. 7 2.2........................... 7 3 DiMP 9 3.1............................... 9 3.2........................... 10 3.3...................................
More information課題
2018 6 22 2. float[] y = new float[5]; void setup() { size(400, 200); for (int i=0;i< (a) ;i++) { y[i] = random(0.3*width, width); void draw() { y[ (b) ] = mousex; int minpos = findminpos( (c) ); for (int
More informationuntitled
METAL FORM METAL FORM METAL FORM METAL FORM METAL FORM METAL FORM METAL FORM METAL FORM METAL FORM METAL FORM METAL FORM METAL FORM 01 METAL FORM METAL FORM 02 03 METAL FORM 04 METAL FORM METAL FORM METAL
More information課題
float[] xball; float[] yball; int numberofballs = (a) ; int radius=10; size(400,400); xball = (b) (c) [numberofballs]; yball = (d) (e) [numberofballs]; xball[i] = random(radius,width-radius); yball[i]
More informationlifedesign_contest_No3
1 3 5 Apple Developer Program 5 AWS 8 Raspberry Pi 14 18 19 { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "sns:createplatformendpoint" ], "Resource": [ ] ] #
More information- 1 - - 2 - - 3 - - 4 - - 5 - - 6 - - 7 - - 8 - - 9 - - 10 - - 11 - - 12 - - 13 - - 14 - - 15 - - 16 - - 17 - - 18 - - 19 - - 20 - - 21 - - 22 - - 23 - - 24 - - 25 - - 26 - - 27 - - 28 - - - - 29 - - 30
More informationuntitled
16 4 1 17 1 50 -1- -2- -3- -4- -5- -6- -7- 1 2-8- -9- -10- -11- Web -12- (1) (2)(1) (3) (4) (1)()(2) (3)(4) -13- -14- -15- -16- -17- -18- -19- -20- -21- -22- -23- (2)(1) (3) -24- -25- -26- -27- -28- -29-
More informationScalaFukuoka 2017 Backlog.key
[T] => -> Option Optional val & var let & var for implicit class Foo(val a: String) { def foo: Int = 3 * a.toint } 9.foo extension String { var foo: Int { return 3 * Int(self)! } } 9.foo struct Foo
More information6-1
6-1 (data type) 6-2 6-3 ML, Haskell, Scala Lisp, Prolog (setq x 123) (+ x 456) (setq x "abc") (+ x 456) ; 6-4 ( ) subtype INDEX is INTEGER range -10..10; type DAY is (MON, TUE, WED, THU, FRI, SAT, SUN);
More information課題
size(300,120); void drawrect(float x,float y,float w,float h,color c){ rectmode(corner); stroke( (a) ); fill( (b) ); rect( (c), (d), (e), (f) ); float x = map(hour(), (g), (h), (i), (j) ); drawrect(0,0,x,height/3,color(
More information02
54 163116831 02 1 168 54 158 53 162 53 148 52 152 52 10,000 0 40,000 30,000 20,000 50,000 70,000 60,000 1,000 500 1,500 2,000 0 2,500 3,000 4,000 3,500 4,500 168 54 158 53 162 53 148 52 152 52 03 52148
More information課題
int[] scores; PFont font; int[] scores = { (a) ; PFont font; size(300,400); scores = (a); scores[0] = 10000; scores[1] = 9000; scores[2] = 5000; scores[3] = 1000; scores[4] = 30; font = loadfont("serif-48.vlw");
More informationUnite2016Tokyo-yasuhara.key
Mathf.Sqrt(100f); (float)system.math.sqrt((double)100f); Mathf.Sqrt(100f); (float)system.math.sqrt((double)100f); Unity Editor(Mac) for Mono(AOT) IL2CPP // var sw = new System.Diagnostics.Stopwatch();
More information-1-1 1 1 1 1 12 31 2 2 3 4
2007 -1-1 1 1 1 1 12 31 2 2 3 4 -2-5 6 CPU 3 Windows98 1 -3-2. 3. -4-4 2 5 1 1 1 -5- 50000 50000 50000 50000 50000 50000 50000 50000 50000 50000-6- -7-1 Windows 2 -8-1 2 3 4 - - 100,000 200,000 500,000
More informationMicrosoft Word - 92.doc
208 9.2 陰線消去 (1) 考え方 9.2 陰線消去 等高線は,3 次元形状を数値的に正確に表示するという意味では有効ですが, 直感的に図形を把握するのが困難です そこで, 普段, 見慣れた見取り図で表示することを試みましょう 曲線の XYZ 座標を 2 次元に平行投影するのが, 最も簡単に見取り図を表示する方法です 図 9-3 に示す式が平行投影における変換式です z,y X Y j j j
More informationまとめ原稿9-1
- 1 - - 2 - - 3 - - 4 - - 5 - - 6 - - 7 - () - 8 - 8 7 () 1 10:0011:30 2 1 2 3 16 () 10:0012:30 3 30 () 10:0012:30-9 - 10 10 . 1 8 22 () 9:3012:00 2 8 30 () 9:3012:00 3 1 26 () 9:3015:30 1 12 23 () 133015:30-10
More informationSwift1.key
Swift Swift 対象読者としては すでにC 言語および Objective-C( あるいは少なくともJava など ) によるプログラミングの経験がある人を想定しています すでに出版されている入門書や雑誌記事ではSwiftの全体像が把握できないと感じている人には特にお勧めです ジェネリクスの機能や標準ライブラリに関する解説なども含んでおり 現時点では最も 濃い Swift 本になっていると思います
More information三井生命の現状2015
22. 2762692 12612 15 276265 27626 618 27626 102645 2 1. 2.. 4. 1 2 4 5 6 7 1 1 1 2 2 4 4 5 6 7 24 5. 6. 7. 8. 9.8 10. 11. 1 2 1 4 5 6 7 2 1 2 1 1 1 1 2 2 25. 27 62647 2611 CCO CCO http://www.mitsui-seimei.co.jp/
More information1_cover
BetweenAS3 Updater Spark Project #APMT 2009.9.11 TAKANAWA Tomoaki ( http://nutsu.com ) http://www.libspark.org/svn/as3/betweenas3/tags/alpha-r3022/ public static function tween(...):iobjecttween { var
More informationex01.dvi
,. 0. 0.0. C () /******************************* * $Id: ex_0_0.c,v.2 2006-04-0 3:37:00+09 naito Exp $ * * 0. 0.0 *******************************/ #include int main(int argc, char **argv) { double
More information6 29 ( )1 6 15 1 mousepressed mouseclicked mousemoved mousedragged mousereleased mousewheel keypressed keyreleased keytyped Shift OK Shift mousewheel void mousewheel(mouseevent event) { void keytyped()
More information@okuraofvegetabl
@okuraofvegetabl 3 I 5 II 7 1.................................... 7 2............................... 10 3................................... 10 4............................ 21 III 29 1 Propagating tree
More informationusing UnityEngine; using System.Collections; namespace Monolizm { /// /// フェイスアニメーション管理クラス. /// public class FaceAnimationController : MonoBehaviour { #region public enumerate -----------------------------------------------------------------
More informationAgenda Motivation How it works Performance Limitation Conclusion
py2llvm: Python to LLVM translator Syoyo Fujita Agenda Motivation How it works Performance Limitation Conclusion Agenda Motivation How it works Performance Limitation Conclusion py2llvm Python LLVM Python,
More informationex01.dvi
,. 0. 0.0. C () /******************************* * $Id: ex_0_0.c,v.2 2006-04-0 3:37:00+09 naito Exp $ * * 0. 0.0 *******************************/ #include int main(int argc, char **argv) double
More informationアルゴリズムとデータ構造1
1 2007 6 26 26 (sakai.keiichi@kochi sakai.keiichi@kochi-tech.ac.jp) http://www.info.kochi-tech.ac.jp/k1sakai/lecture/alg/2007/index.html tech.ac.jp/k1sakai/lecture/alg/2007/index.html FIFO (46 ) head,
More informationWebGL X LR301 Kageyama (Kobe Univ.) Visualization / 45
2014.05.13 X021 2014 LR301 Kageyama (Kobe Univ.) Visualization 2014.05.13 1 / 45 Kageyama (Kobe Univ.) Visualization 2014.05.13 2 / 45 Kageyama (Kobe Univ.) Visualization 2014.05.13 3 / 45 Web アプリ HTML
More informationC#JobSystem_Intel
Unity のマルチスレッドプログラミング ユニティ テクノロジーズ ジャパン合同会社 エバンジェリスト 伊藤周 諸注意 今回紹介するC# Job Systemはまだ発展段階 リリースでは多少の差異が出る可能性がある C# Job Systemの概念を知ってほしい プログラマ以外は理解不能 アジェンダ 従来のマルチスレッドプログラミング C# Job System の概要 Let s read codes.
More information10/ / /30 3. ( ) 11/ 6 4. UNIX + C socket 11/13 5. ( ) C 11/20 6. http, CGI Perl 11/27 7. ( ) Perl 12/ 4 8. Windows Winsock 12/11 9. JAV
tutimura@mist.i.u-tokyo.ac.jp kaneko@ipl.t.u-tokyo.ac.jp http://www.misojiro.t.u-tokyo.ac.jp/ tutimura/sem3/ 2002 12 11 p.1/33 10/16 1. 10/23 2. 10/30 3. ( ) 11/ 6 4. UNIX + C socket 11/13 5. ( ) C 11/20
More informationWebGL References Kageyama (Kobe Univ.) Visualization 2013.05.07 *4 2 / 54
WebGL *1 2013.05.07 *2 *1 X021 2013 LR301 *2 05/08: Kageyama (Kobe Univ.) Visualization 2013.05.07 *3 1 / 54 WebGL References Kageyama (Kobe Univ.) Visualization 2013.05.07 *4 2 / 54 Chrome Firefox http://www.khronos.org/webgl/wiki/demo_repository
More information70の法則
70 70 1 / 27 70 1 2 3 4 5 6 2 / 27 70 70 70 X r % = 70 2 r r r 10 72 70 72 70 : 1, 2, 5, 7, 10, 14, 35, 70 72 : 1, 2, 3, 4, 6, 8, 9, 12, 18, 24, 36, 72 3 / 27 r = 10 70 r = 10 70 1 : X, X 10 = ( X + X
More informationuntitled
146,650 168,577 116,665 122,915 22,420 23,100 7,564 22,562 140,317 166,252 133,581 158,677 186 376 204 257 5,594 6,167 750 775 6,333 2,325 298 88 5,358 756 1,273 1,657 - - 23,905 23,923 1,749 489 1,309
More informationWebGL Safari WebGL WebGL Safari Kageyama (Kobe Univ.) / 5
04 1 2015.05.12 Kageyama (Kobe Univ.) 2015.05.12 1 / 55 WebGL Safari WebGL WebGL http://www.khronos.org/webgl/ http://www.khronos.org/webgl/wiki/demo_repository Safari Kageyama (Kobe Univ.) 2015.05.12
More informationWebGL Safari WebGL Kageyama (Kobe Univ.) Visualization / 55
WebGL WebGL 2014.04.22 X021 2014 Kageyama (Kobe Univ.) Visualization 2014.04.22 1 / 55 WebGL Safari WebGL http://bit.ly/1qxgljb Kageyama (Kobe Univ.) Visualization 2014.04.22 2 / 55 Kageyama (Kobe Univ.)
More information(STL) STL 1 (deta structure) (algorithm) (deta structure) 2 STL STL (Standard Template Library) 2.1 STL STL ( ) vector<int> x; for(int i = 0; i < 10;
(STL) STL 1 (deta structure) (algorithm) (deta structure) 2 STL STL (Standard Template Library) 2.1 STL STL ( ) vector x; for(int i = 0; i < 10; ++i) x.push_back(i); vector STL x.push_back(i) STL
More informationJava演習(4) -- 変数と型 --
50 20 20 5 (20, 20) O 50 100 150 200 250 300 350 x (reserved 50 100 y 50 20 20 5 (20, 20) (1)(Blocks1.java) import javax.swing.japplet; import java.awt.graphics; (reserved public class Blocks1 extends
More information2 T ax 2 + 2bxy + cy 2 + dx + ey + f = 0 a + b + c > 0 a, b, c A xy ( ) ( ) ( ) ( ) u = u 0 + a cos θ, v = v 0 + b sin θ 0 θ 2π u = u 0 ± a
2 T140073 1 2 ax 2 + 2bxy + cy 2 + dx + ey + f = 0 a + b + c > 0 a, b, c A xy u = u 0 + a cos θ, v = v 0 + b sin θ 0 θ 2π u = u 0 ± a cos θ, v = v 0 + b tan θ π 2 < θ < π 2 u = u 0 + 2pt, v = v 0 + pt
More informationCUDA を用いた画像処理 画像処理を CUDA で並列化 基本的な並列化の考え方 目標 : 妥当な Naïve コードが書ける 最適化の初歩がわかる ブロックサイズ メモリアクセスパターン
CUDA 画像処理入門 エヌビディアジャパン CUDA エンジニア森野慎也 GTC Japan 2014 CUDA を用いた画像処理 画像処理を CUDA で並列化 基本的な並列化の考え方 目標 : 妥当な Naïve コードが書ける 最適化の初歩がわかる ブロックサイズ メモリアクセスパターン RGB Y( 輝度 ) 変換 カラー画像から グレイスケールへの変換 Y = 0.299 R + 0.587
More informationMicrosoft PowerPoint - 13th.ppt [互換モード]
工学部 6 7 8 9 10 組 ( 奇数学籍番号 ) 担当 : 長谷川英之 情報処理演習 第 13 回 2011 年 1 月 13 日 1 本日の講義の内容 1. 配列データを main 以外の関数とやりとりする方法 2. データの型構造体, 共用体という新しいデータ型を学習します. 2 2 次元ベクトルのノルム ( 長さ ) を計算するプログラム 2 次元ベクトル a(x, y) のノルム (
More information課題
2019 7 12 確認 したプログラムはキャリアポートフォリオに提出して下さい float[] y = new float[5]; void setup() { size(400, 200); for (int i=0;i< (a) ;i++) { y[i] = random(0.3*width, width); void draw() { stroke(0); y[ (b) ] = mousex;
More informationSlide 1
OpenFoam のための C/C++ 第 3 回 OpenFoam で勉強るテンプレート 田中昭雄 1 目的 この勉強会の資料があれば OpenFoam カスタマイズ時に C/C++ で迷わない 2 予定 第 1 回メモリ管理 第 2 回 CFDの例で勉強するクラス 第 3 回 OpenFOAMで勉強するテンプレート 第 4 回 OpenFOAMカスタマイズ 第 5 回未定 第 6 回未定 3 今回のテーマ
More information新・明解Java入門
537,... 224,... 224,... 32, 35,... 188, 216, 312 -... 38 -... 38 --... 102 --... 103 -=... 111 -classpath... 379 '... 106, 474!... 57, 97!=... 56 "... 14, 476 %... 38 %=... 111 &... 240, 247 &&... 66,
More information1 level Level swtich ButtonPress ButtonRelease Expose Level
UNIX 4 2D/3D Grahpics,GUI :2-3 - 045708G 045726E 045730C 045735D 045759B 045762B 1 level1 1 11 2 12 4 13 6 14 6 2 Level2 6 21 6 211 swtich 11 212 ButtonPress 11 213 ButtonRelease 12 214 Expose 12 22 12
More information£Ã¥×¥í¥°¥é¥ß¥ó¥°(2018) - Âè10²ó – ¿¹à¼°¤Îɾ²Á¡§¥¢¥ë¥´¥ê¥º¥à¤Î²þÁ± –
(2018) 10 2018 12 06 p(x) = a n x n + a n 1 x n 1 + + a 1 x + a 0 = n a n x n k=0 p(x) = a n x n + a n 1 x n 1 + + a 1 x + a 0 = n a n x n k=0 1 a k x k = a k {{ x x x p(x) = a n x n + a n 1 x n 1 + +
More information( ) ( ) 30 ( ) 27 [1] p LIFO(last in first out, ) (push) (pup) 1
() 2006 2 27 1 10 23 () 30 () 27 [1] p.97252 7 2 2.1 2.1.1 1 LIFO(last in first out, ) (push) (pup) 1 1: 2.1.2 1 List 4-1(p.100) stack[] stack top 1 2 (push) (pop) 1 2 void stack push(double val) val stack
More informationuntitled
A = QΛQ T A n n Λ Q A = XΛX 1 A n n Λ X GPGPU A 3 T Q T AQ = T (Q: ) T u i = λ i u i T {λ i } {u i } QR MR 3 v i = Q u i A {v i } A n = 9000 Quad Core Xeon 2 LAPACK (4/3) n 3 O(n 2 ) O(n 3 ) A {v i }
More informationⅠ.市場リスクの計測手法
1 2 3 4 { } n n 5 R R R R 1 6 7 8 9 , 10 11 12 13 14 15 T 16 T 17 18 19 20 21 22 23 99VaR 99 24 25 26 0.5 0.5 27 99 28 99 99 29 99 30 31 t-1 t-1 t-1 t-1 t-10 t-10 t-10 t-10 32 33 2 T 2 34 99 99 99 35 36
More informationアルゴリズムとデータ構造1
1 2005 7 22 22 (sakai.keiichi@kochi sakai.keiichi@kochi-tech.ac.jp) http://www.info.kochi-tech.ac.jp/k1sakai/lecture/alg/2005/index.html tech.ac.jp/k1sakai/lecture/alg/2005/index.html f(0) = 1, f(x) =
More information11.6 8.6 11.9 12.0 8.3 8.9 18.1 4.6 0.2 6.1 0.2 89.5 0.1 4.6 0.2 6.1 0.2 2.2 0.1 2.7 0.0 9.21.2 2.1 1.1 3.6 0.8 18 89.5 0.1 10 9.8 0.8 4 42.71.5 18.4 0.1 15.2 0.4 95.9 0.1 94.6 0.1 98.3 0.0 97.5 0.1
More information橡計画0.PDF
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 120. ( ) 620 250 29 30 31 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 Return on Risk Assets 57 58
More informationユニセフ表紙_CS6_三.indd
16 179 97 101 94 121 70 36 30,552 1,042 100 700 61 32 110 41 15 16 13 35 13 7 3,173 41 1 4,700 77 97 81 47 25 26 24 40 22 14 39,208 952 25 5,290 71 73 x 99 185 9 3 3 3 8 2 1 79 0 d 1 226 167 175 159 133
More informationCuPy とは何か?
GTC Japan 2018 CuPy NumPy 互換 GPU ライブラリによる Python での高速計算 Preferred Networks 取締役最高技術責任者奥田遼介 okuta@preferred.jp CuPy とは何か? CuPy とは GPU を使って NumPy 互換の機能を提供するライブラリ import numpy as np X_cpu = np.zeros((10,))
More informationIPA... 3... 4... 7... 8... 8... 10... 11... 13... 14... 21... 21... 23... 27 2
IPA 1 IPA... 3... 4... 7... 8... 8... 10... 11... 13... 14... 21... 21... 23... 27 2 IPA 2011103 3 1 139 2 4 10 4 5 6 7 8 9 2 ID 10 11 12 13 14 15 16 17 18 19 20 http://www.jpcert.or.jp/research/2008/inoculation_200808.pdf
More informationPython Speed Learning
Python Speed Learning 1 / 76 Python 2 1 $ python 1 >>> 1 + 2 2 3 2 / 76 print : 1 print : ( ) 3 / 76 print : 1 print 1 2 print hello 3 print 1+2 4 print 7/3 5 print abs(-5*4) 4 / 76 print : 1 print 1 2
More information第3章 OpenGL の基礎
3 OpenGL April 20, 2012 1 / 23 31 ( ) OpenGL OpenGL 2 / 23 32 OpenGL OpenGL OpenGL (Open Graphics Library) Silicon Graphics, Inc 2 3 API (Application Program Interface) [4] UNIX OS Windows Macintosh CAD
More informationMicrosoft Word - keisankigairon.ch doc
1000000100001010 1000001000001011 0100001100010010 1010001100001100 load %r1,10 load %r2,11 add %r3,%r1,%r2 store %r3,12 k = i + j ; = > (* 1 2 3 4 5 6 7 8 9 10) 3628800 DO 3 I=1,3 DO3I=1.3 DO3I 1.3
More informationjava_servlet2_見本
13 2 JSF Web 1 MVC HTML JSP Velocity Java 14 JSF UI PC GUI JSF Web 2.1 JSF JSF Web FORM FORM 2-1 JSF role, JSF JSF 15 Web JSF JSF Web Macromedia JSF JSF JSF 2.2 / Subscriber package com.mycompany.newsservice.models;
More informationSlide 1
CUDA プログラミングの基本 パート I - ソフトウェアスタックとメモリ管理 CUDA の基本の概要 パート I CUDAのソフトウェアスタックとコンパイル GPUのメモリ管理 パートII カーネルの起動 GPUコードの具体項目 注 : 取り上げているのは基本事項のみです そのほか多数の API 関数についてはプログラミングガイドを ご覧ください CUDA インストレーション CUDA インストレーションの構成
More informationInt Int 29 print Int fmt tostring 2 2 [19] ML ML [19] ML Emacs Standard ML M M ::= x c λx.m M M let x = M in M end (M) x c λx.
1, 2 1 m110057@shibaura-it.ac.jp 2 sasano@sic.shibaura-it.ac.jp Eclipse Visual Studio ML Standard ML Emacs 1 ( IDE ) IDE C C++ Java IDE IDE IDE IDE Eclipse Java IDE Java Standard ML 1 print (Int. 1 Int
More information課題
float xball;// 円の中心の X 座標 float yball; // 円の中心の Y 座標 float rball; // 円の半径 color cball; // 円の色 // 円を移動させる void updateball(){ yball -= 1; if(yball+rball< 0){ yball = height+rball; // 円を描く void drawball(){
More informationプログラミング基礎
C プログラミング Ⅱ 演習 2-1(a) BMI による判定 文字列, 身長 height(double 型 ), 体重 weight (double 型 ) をメンバとする構造体 Data を定義し, それぞれのメンバの値をキーボードから入力した後, BMI を計算するプログラムを作成しなさい BMI の計算は関数化すること ( ) [ ] [ ] [ ] BMI = 体重 kg 身長 m 身長
More informationグラフを表すデータ構造 Javaでの実装
グラフを表すデータ構造 JAVA での実装 なぜ JAVA を使うか グラフの実装 頂点 弧及びその関連を記述する 頂点の数 弧の数を柔軟に変える必要あり グラフ探索など リンクをたどる必要あり オブジェクト指向言語が向いている オブジェクト数の柔軟な変更 再帰的関数 メソッド リストなどの豊富なライブラリ java.util.vector など 使い易い開発環境 プロジェクト管理 クラス管理 GUI
More information) CoreImage 2013/5/25 iphone
) CoreImage 2013/5/25 iphone DJ / : takatronix Facebook/Twitter/Skype/LINE/Weibo -> takatronix http://takatronix.com LEGO FX SEXY SCAN... (SexyMirror)2013/1 iphone ios API UIImagePickerController UI AVFoundation.framework
More informationPython Speed Learning
Python Speed Learning 1 / 89 1 2 3 4 (import) 5 6 7 (for) (if) 8 9 10 ( ) 11 12 for 13 2 / 89 Contents 1 2 3 4 (import) 5 6 7 (for) (if) 8 9 10 ( ) 11 12 for 13 3 / 89 (def) (for) (if) etc. 1 4 / 89 Jupyter
More informationJava演習(9) -- クラスとメソッド --
Java (9) Java (9) Java (9) 3 (x, y) x 1 30 10 (0, 50) 1 2 10 10 (width - 10, 80) -2 3 50 10 (width / 2, 110) 2 width 3 (RectMove4-1.java) import javax.swing.japplet; import javax.swing.timer; import java.awt.graphics;
More information07-二村幸孝・出口大輔.indd
GPU Graphics Processing Units HPC High Performance Computing GPU GPGPU General-Purpose computation on GPU CPU GPU GPU *1 Intel Quad-Core Xeon E5472 3.0 GHz 2 6 MB L2 cache 1600 MHz FSB 80 GFlops 1 nvidia
More informationr3.dvi
00 3 2000.6.10 0 Java ( 7 1 7 1 GSSM 1? 1 1.1 4 4a 4b / / 0 255 HTML X 0 255 16 (0,32,255 #0020FF Java xclock -bg #0020FF xclock ^C (Control C xclock 4c 1 import java.applet.applet; import java.awt.*;
More information第3章 OpenGL の基礎
3 OpenGL April 11, 2017 1 / 28 3.1 ( ) OpenGL OpenGL 2 / 28 3.2 OpenGL OpenGL OpenGL (Open Graphics Library) Silicon Graphics, Inc. 2 3 API (Application Program Interface) [4] UNIX OS Windows Macintosh
More informationJava 3 p.2 3 Java : boolean Graphics draw3drect fill3drect C int C OK while (1) int boolean switch case C Calendar java.util.calendar A
Java 3 p.1 3 Java Java if for while C 3.1 if Java if C if if ( ) 1 if ( ) 1 else 2 1 1 2 2 1, 2 { Q 3.1.1 1. int n = 2; if (n
More informationグラフの探索 JAVA での実装
グラフの探索 JAVA での実装 二つの探索手法 深さ優先探索 :DFS (Depth-First Search) 幅優先探索 :BFS (Breadth-First Search) 共通部分 元のグラフを指定して 極大木を得る 探索アルゴリズムの利用の観点から 利用する側からみると 取り替えられる部品 どちらの方法が良いかはグラフに依存 操作性が同じでなければ 共通のクラスの派生で作ると便利 共通化を考える
More information...3 1-1...3 1-1...6 1-3...16 2....17...21 3-1...21 3-2...21 3-2...22 3-3...23 3-4...24...25 4-1....25 4-2...27 4-3...28 4-4...33 4-5...36...37 5-1...
DT-870/5100 &DT-5042RFB ...3 1-1...3 1-1...6 1-3...16 2....17...21 3-1...21 3-2...21 3-2...22 3-3...23 3-4...24...25 4-1....25 4-2...27 4-3...28 4-4...33 4-5...36...37 5-1....39 5-2...40 5-3...43...49
More informationMicrosoft Word - DT-5100Lib_Manual_DotNet.doc
CASSIOPEIA DT-5100 シリーズ.NET ライブラリマニュアル 概要編 Ver 3.00 変更履歴 No Revision 更新日項改訂内容 1 1.00 03/1/20 初版初版発行 2 3.00 05/03/15 3 カシオライブラリマニュアル (.NET) 開発マニュアルの 1~4 をひとまとめ にしました 4 5 6 7 8 9 10 11 12 13 14 15 16 17
More information