caimmetal03.key
|
|
- あゆみ まきい
- 4 years ago
- Views:
Transcription
1
2
3
4 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 pos:float2 = Float2() 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 render_circle:caimmetalrenderer? private var mat:matrix4x4 =.identity private var circles = CAIMQuadrangles<Vertex>(count: 100) // // // private var circle_parts = [Particle]() //
5 () // private func setupcircles() { // render_circle = CAIMMetalRenderer(vertname:"vert2d", fragname:"fragcirclecoscurve") // render_circle?.blendtype =.alphablend // render_circle?.depthcompare =.always render_circle?.depthenabled = false // let wid = Float(CAIM.screenPixel.width) let hgt = Float(CAIM.screenPixel.height) for _ in 0..< circles.count { var p:particle = Particle() p.pos = Float2(CAIM.random(wid), CAIM.random(hgt)) p.rgba = CAIMColor(CAIM.random(), CAIM.random(), CAIM.random(), CAIM.random()) p.radius = CAIM.random(100.0) p.life = CAIM.random() circle_parts.append(p) // override func setup() { // () () mat = Matrix4x4.pixelProjection(CAIM.screenPixel) // setupcircles()
6 () // private func updatecircles() { // let wid = Float(CAIM.screenPixel.width) let hgt = Float(CAIM.screenPixel.height) for i 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 = Float2(CAIM.random(wid), CAIM.random(hgt)) circle_parts[i].rgba = CAIMColor(CAIM.random(), CAIM.random(), CAIM.random(), CAIM.random()) circle_parts[i].radius = CAIM.random(100.0) circle_parts[i].life = 1.0
7 () // private func gencirclesmesh() { for i in 0..< circles.count { // let p = circle_parts[i] let x = p.pos.x let y = p.pos.y // x // y let r = p.radius * (1.0 - p.life) // () var rgba = p.rgba rgba.a *= p.life // // () () // i0 circles[i][0].pos = Float2(x-r, y-r) circles[i][0].uv = Float2(-1.0, -1.0) circles[i][0].rgba = rgba.float4 // i1 circles[i][1].pos = Float2(x+r, y-r) circles[i][1].uv = Float2(1.0, -1.0) circles[i][1].rgba = rgba.float4 // i2 circles[i][2].pos = Float2(x-r, y+r) circles[i][2].uv = Float2(-1.0, 1.0) circles[i][2].rgba = rgba.float4 // i3 circles[i][3].pos = Float2(x+r, y+r) circles[i][3].uv = Float2(1.0, 1.0) circles[i][3].rgba = rgba.float4
8 () // private func drawcircles(on metalview:caimmetalview) { // () render_circle?.begindrawing(on: metalview) // CPUGPU render_circle?.link(circles.metalbuffer, to:.vertex, at:id_vertex) render_circle?.link(mat.metalbuffer, to:.vertex, at:id_projection) // GPU(circles) render_circle?.draw(circles) // override func update(metalview: CAIMMetalView) { // updatecircles() // gencirclesmesh() // drawcircles(on:metalview)
9 #include <metal_stdlib> using namespace metal; // ID constant int ID_VERTEX = 0; constant int ID_PROJECTION = 1; // struct VertexIn { float2 pos; float2 uv; 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 idx [[ vertex_id ]]) { VertexOut vout; // float2z=0,w=1 float4 vout.pos = proj_matrix * float4(vin[idx].pos, 0, 1); vout.uv = vin[idx].uv; vout.rgba = vin[idx].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]; // uv float dist = sqrt(dist2); // uv1.0 = (discard_fragment()) if(dist >= 1.0) { discard_fragment(); // cos(rgba[3]=) float4 rgba = vout.rgba; rgba[3] = vout.rgba[3] * (1.0 + cos(m_pi_f * dist)) / 2.0; return rgba;
10
11
12 import UIKit import simd () // CAIM-Metal class DrawingViewController : CAIMMetalViewController { private var render_circle:caimmetalrenderer? private var render_ring:caimmetalrenderer? private var mat:matrix4x4 =.identity private var circles = CAIMQuadrangles<Vertex>(count: 100) private var rings = CAIMQuadrangles<Vertex>(count: 100) // // // // private var circle_parts = [Particle]() // private var ring_parts = [Particle]() // ()
13 () private func setupcircles() { // private func setuprings() { // render_ring = CAIMMetalRenderer(vertname:"vert2d", fragname:"fragring") // render_ring?.blendtype =.alphablend // render_ring?.depthcompare =.always render_ring?.depthenabled = false // let wid = Float(CAIM.screenPixel.width) let hgt = Float(CAIM.screenPixel.height) for _ in 0..< rings.count { var p = Particle() p.pos = Float2(CAIM.random(wid), CAIM.random(hgt)) p.rgba = CAIMColor(CAIM.random(), CAIM.random(), CAIM.random(), CAIM.random()) p.radius = CAIM.random(100.0) p.life = CAIM.random() ring_parts.append(p) override func setup() { // (GPU)() mat_buf = CAIMMetalBuffer(Matrix4x4.pixelProjection(CAIMScreenPixel)) // setupcircles() // setuprings() ()
14 () // private func updaterings() { let wid = Float(CAIM.screenPixel.width) let hgt = Float(CAIM.screenPixel.height) // for i 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 = Float2(CAIM.random(wid), CAIM.random(hgt)) ring_parts[i].rgba = CAIMColor(CAIM.random(), CAIM.random(), CAIM.random(), CAIM.random()) ring_parts[i].radius = CAIM.random(100.0) ring_parts[i].life = 1.0
15 () // private func genringsmesh() { // for i in 0..< rings.count { // let p = ring_parts[i] let x = p.pos.x let y = p.pos.y // x // y let r = p.radius * (1.0 - p.life) // () var rgba = p.rgba rgba.a *= p.life // // () () // i0 rings[i][0].pos = Float2(x-r, y-r) rings[i][0].uv = Float2(-1.0, -1.0) rings[i][0].rgba = rgba.float4 // i1 rings[i][1].pos = Float2(x+r, y-r) rings[i][1].uv = Float2(1.0, -1.0) rings[i][1].rgba = rgba.float4 // i2 rings[i][2].pos = Float2(x-r, y+r) rings[i][2].uv = Float2(-1.0, 1.0) rings[i][2].rgba = rgba.float4 // i3 rings[i][3].pos = Float2(x+r, y+r) rings[i][3].uv = Float2(1.0, 1.0) rings[i][3].rgba = rgba.float4
16 () // private func drawrings(on metalview:caimmetalview) { // () render_ring?.begindrawing(on: metalview) // CPUGPU render_ring?.link(rings.metalbuffer, to:.vertex, at:id_vertex) render_ring?.link(mat.metalbuffer, to:.vertex, at:id_projection) // GPU(rings) render_ring?.draw(rings) // override func update(metalview: CAIMMetalView) { // updatecircles() // gencirclesmesh() // drawcircles(on: metalview) // updaterings() // genringsmesh() // drawrings(on: metalview)
17 () // (2D) vertex VertexOut vert2d(device VertexIn *vin [[ buffer(id_vertex) ]], constant float4x4 &proj_matrix [[ buffer(id_projection) ]], uint idx [[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 // 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
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 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 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 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 informationusing UnityEngine; using System.Collections; namespace Monolizm { /// /// フェイスアニメーション管理クラス. /// public class FaceAnimationController : MonoBehaviour { #region public enumerate -----------------------------------------------------------------
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 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 informationMicrosoft Word - 92.doc
208 9.2 陰線消去 (1) 考え方 9.2 陰線消去 等高線は,3 次元形状を数値的に正確に表示するという意味では有効ですが, 直感的に図形を把握するのが困難です そこで, 普段, 見慣れた見取り図で表示することを試みましょう 曲線の XYZ 座標を 2 次元に平行投影するのが, 最も簡単に見取り図を表示する方法です 図 9-3 に示す式が平行投影における変換式です z,y X Y j j j
More informationuntitled
C++2 1. publicprivate 2. 3. 4. 5. Intelligent Electronic Systems Group protected Carmainmy_car.car_number ca_number //Car class Car int car_number; // void showgas( ); // double gas; // void shownumber(
More informationH:\Projects2013\MatrixLibrary\MatrixLibrary\MatrixLibrary.cs /* ************************ * * * 行列関係のライブラリ * * * ************************ * * 行列の要素 A.V
/ 行列関係のライブラリ 行列の要素 A.Value[m, n] n 次単位行列 (static) Matrix.Identity(n) m n 型零行列 (static) Matrix.Zero(m, n) 行列式 (static) Matrix.Determinant(A) 逆行列 A.Inverse() m 行 n 列目を除いた小行列 A.SubMatrix(m, n) ただし 行 列の開始は
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 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(300, 150) 120 getchar() HgBox(x, y, w, h) (x, y), w, h #include <stdio.h> #include <handy.h> int main(void) { int i; double w, h; } HgO
Handy Graphic for Handy Graphic Version 0.5 2008-06-09 1 Handy Graphic Handy Graphic C Handy Graphic Handy Graphic Mac OS X Handy Graphic HgDisplayer Handy Graphic HgDisplayer 2 Handy Graphic 1 Handy Graphic
More information北米アジャイル界デビュー fkinoからは 何も聞いてませんでした これまでに書いたもの Web 2.0 ビギナーズバイブル エンジニアマインド vol.5 開発の現場 vol.011 Dave 達人 Thomasも云ってたよ http://jp.rubyist.net/rubykaigi2007/?c=plugin;plugin=attach_download;p=program0610;file_name=the_island_of_ruby_j.pdf
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(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 informationA, K, Q, J, 10, 9, 8, 7, 6, 5, 4, 3,
40 2 1. 2 2. 52 3. A, K, Q, J, 10, 9, 8, 7, 6, 5, 4, 3, 2 4. 13 5. 6. 7. 8. 9. 13 10. 11. 12. 1 VC++ VC++ Visual C++ Professional 2010 Visual C++ 2010 express Windows whist 2 OK] 3 Form1 size 800, 500
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 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 - - 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 information連載講座 : 高生産並列言語を使いこなす (5) 分子動力学シミュレーション 田浦健次朗 東京大学大学院情報理工学系研究科, 情報基盤センター 目次 1 問題の定義 17 2 逐次プログラム 分子 ( 粒子 ) セル 系の状態 ステップ 18
連載講座 : 高生産並列言語を使いこなす (5) 分子動力学シミュレーション 田浦健次朗 東京大学大学院情報理工学系研究科, 情報基盤センター 目次 1 問題の定義 17 2 逐次プログラム 17 2.1 分子 ( 粒子 ) 17 2.2 セル 17 2.3 系の状態 18 2.4 1ステップ 18 2.5 力の計算 19 2.6 速度と位置の更新 20 2.7 セル間の分子の移動 21 3 OpenMP
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 informationWindows (L): D:\jyugyou\ D:\jyugyou\ D:\jyugyou\ (N): en2 OK 2
Windows C++ Microsoft Visual Studio 2010 C++ Microsoft C++ Microsoft Visual Studio 2010 Microsoft Visual Studio 2010 C++ C C++ Microsoft Visual Studio 2010 Professional Professional 1 Professional Professional
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 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 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 informationC# ++ MASA C# ( ) XNA 1.1 C# ( ) VisualStuio XNA 4.0 VisualStuio XNA 3.1 * * *3 2.1 VisualStuio Windows ( TextGam
C# ++ MASA 2011 8 1 C# ( ) XNA 1.1 C# ( ) VisualStuio 2010 + XNA 4.0 VisualStuio 2008 + XNA 3.1 *1 1.2 1 *2 1.3 2 *3 2.1 VisualStuio Windows ( TextGame2 ) OK *1 XNA 3.1 4.0 *2 *3 1 TextGame2 ( Ship ) 32*32
More informationソフトゼミC 第二回 C++の基礎
2013/08/06 エレクトロニクス研究部 C++ とは何か? ストリームライブラリを使った入出力 cin/coutについて CとC++ の構造体の違い classの基礎とメンバ関数 カプセル化 コンストラクタとは C++ とは何か? C++ はその名の通り C 言語の 拡張として 1983 年に作られた 開発当時は C with Classes と呼ばれ C 言語にクラスの概念を持たせた言語である
More information@okuraofvegetabl
@okuraofvegetabl 3 I 5 II 7 1.................................... 7 2............................... 10 3................................... 10 4............................ 21 III 29 1 Propagating tree
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 informationSwift1.key
Swift Swift 対象読者としては すでにC 言語および Objective-C( あるいは少なくともJava など ) によるプログラミングの経験がある人を想定しています すでに出版されている入門書や雑誌記事ではSwiftの全体像が把握できないと感じている人には特にお勧めです ジェネリクスの機能や標準ライブラリに関する解説なども含んでおり 現時点では最も 濃い Swift 本になっていると思います
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 information2 ColorSpace DepthSpace CameraSpace Kinect V2 Kinect V2 BOdyIndex 3. NtKinect Kinect V2 C++ NtKinect [4] NtKinect = Kinect SDK + + STL(C++) + OpenCV +
NtKinect: C++ Class Library for Kinect V2 1,a) Kinect for Windows V2 C++ NtKinect NtKinect DLL Kinect V2 Kinect V2, C++, DLL, Unity NtKinect: C++ Class Library for Kinect V2 Nitta Yoshihisa 1,a) Abstract:
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 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 informationcpp1.dvi
2017 c 1 C++ (1) C C++, C++, C 11, 12 13 (1) 14 (2) 11 1 n C++ //, [List 11] 1: #include // C 2: 3: int main(void) { 4: std::cout
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 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 informationC#JobSystem_Intel
Unity のマルチスレッドプログラミング ユニティ テクノロジーズ ジャパン合同会社 エバンジェリスト 伊藤周 諸注意 今回紹介するC# Job Systemはまだ発展段階 リリースでは多少の差異が出る可能性がある C# Job Systemの概念を知ってほしい プログラマ以外は理解不能 アジェンダ 従来のマルチスレッドプログラミング C# Job System の概要 Let s read codes.
More informationGAIO CLUB
NISSAN Cam Shaft Crank Shaft Spark Plug Spark Plug Fuel Injector Fuel Injector Signal Conditioning Signal Conditioning Driver Driver Driver Driver Input Input Output Output Output Output etpu MPC5554 Core
More informationdouble float
2015 3 13 1 2 2 3 2.1.......................... 3 2.2............................. 3 3 4 3.1............................... 4 3.2 double float......................... 5 3.3 main.......................
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 informationACE Associated Computer Experts bv
CoSy Application CoSy Marcel Beemster/Yoichi Sugiyama ACE Associated Compiler Experts & Japan Novel Corporation contact: yo_sugi@jnovel.co.jp Parallel Architecture 2 VLIW SIMD MIMD 3 MIMD HW DSP VLIW/ILP
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 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 information() / (front end) (back end) (phase) (pass) 1 2
1 () () lex http://www.cs.info.mie-u.ac.jp/~toshi/lectures/compiler/ 2018 4 1 () / (front end) (back end) (phase) (pass) 1 2 () () var left, right; fun int main() { left = 0; right = 10; return ((left
More informationグラフの探索 JAVA での実装
グラフの探索 JAVA での実装 二つの探索手法 深さ優先探索 :DFS (Depth-First Search) 幅優先探索 :BFS (Breadth-First Search) 共通部分 元のグラフを指定して 極大木を得る 探索アルゴリズムの利用の観点から 利用する側からみると 取り替えられる部品 どちらの方法が良いかはグラフに依存 操作性が同じでなければ 共通のクラスの派生で作ると便利 共通化を考える
More information解きながら学ぶJava入門編
44 // class Negative { System.out.print(""); int n = stdin.nextint(); if (n < 0) System.out.println(""); -10 Ÿ 35 Ÿ 0 n if statement if ( ) if i f ( ) if n < 0 < true false true false boolean literalboolean
More information19 3!! (+) (>) (++) (+=) for while 3.1!! (20, 20) (1)(Blocks1.java) import javax.swing.japplet; import java.awt.graphics;
19 3!!...... (+) (>) (++) (+=) for while 3.1!! 3.1.1 50 20 20 5 (20, 20) 3.1.1 (1)(Blocks1.java) public class Blocks1 extends JApplet { public void paint(graphics g){ 5 g.drawrect( 20, 20, 50, 20); g.drawrect(
More informationN 体問題 長岡技術科学大学電気電子情報工学専攻出川智啓
N 体問題 長岡技術科学大学電気電子情報工学専攻出川智啓 今回の内容 天体の運動方程式 天体運動の GPU 実装 最適化による性能変化 #pragma unroll 855 計算の種類 画像処理, 差分法 空間に固定された観測点を配置 観測点 ( 固定 ) 観測点上で物理量がどのように変化するかを追跡 Euler 型 多粒子の運動 観測点を配置せず, 観測点が粒子と共に移動 Lagrange 型 観測点
More information( CUDA CUDA CUDA CUDA ( NVIDIA CUDA I
GPGPU (II) GPGPU CUDA 1 GPGPU CUDA(CUDA Unified Device Architecture) CUDA NVIDIA GPU *1 C/C++ (nvcc) CUDA NVIDIA GPU GPU CUDA CUDA 1 CUDA CUDA 2 CUDA NVIDIA GPU PC Windows Linux MaxOSX CUDA GPU CUDA NVIDIA
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 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 informationAn Introduction to OSL
.... An Introduction to OSL TeamGPS 2009 3 CSA (TeamGPS) An Introduction to OSL 2009 3 CSA 1 / 45 ..1..2..3..4.... : (TeamGPS) An Introduction to OSL 2009 3 CSA 2 / 45 Disclaimer: OSL Bonanza Crafty (pruning/cut,
More information演習課題No12
演習課題 No.12 ( 課題は 3 題ある ) 課題 12-1 時間内提出 従来の C 言語には複素数を直接扱うデータ型はないので (*), 構造体で複素数 ( 英語で complex) を表すことにする. 複素数を表す構造体を以下のように定義する. struct complex float r; // 実部 ( 英語で real) float i; // 虚部 ( 英語で imaginary)
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 information¥×¥í¥°¥é¥ß¥ó¥°±é½¬I Exercise on Programming I [1zh] ` `%%%`#`&12_`__~~~alse
I Exercise on Programming I http://bit.ly/oitprog1 1, 2 of 14 ( RD S ) I 1, 2 of 14 1 / 44 Ruby Ruby ( RD S ) I 1, 2 of 14 2 / 44 7 5 9 2 9 3 3 2 6 5 1 3 2 5 6 4 7 8 4 5 2 7 9 6 4 7 1 3 ( RD S ) I 1, 2
More information「Android Studioではじめる 簡単Androidアプリ開発」正誤表
Android Studio Android 2016/04/19 Android Studio Android *1 Android Studio Android Studio Android Studio Android Studio Android PDF : Android Studio Android Android Studio Android *2 c R TM *1 Android
More informationやさしいJavaプログラミング -Great Ideas for Java Programming サンプルPDF
pref : 2004/6/5 (11:8) pref : 2004/6/5 (11:8) pref : 2004/6/5 (11:8) 3 5 14 18 21 23 23 24 28 29 29 31 32 34 35 35 36 38 40 44 44 45 46 49 49 50 pref : 2004/6/5 (11:8) 50 51 52 54 55 56 57 58 59 60 61
More information1st-session key
1 2013/11/29 Project based Learning: Soccer Agent Program 1 2012/12/9 Project based Learning: Soccer Agent Program PBL Learning by doing Schedule 1,2 2013 11/29 Make 2013 12/6 2013 12/13 2013 12/20 2014
More informationグラフを表すデータ構造 Javaでの実装
グラフを表すデータ構造 JAVA での実装 なぜ JAVA を使うか グラフの実装 頂点 弧及びその関連を記述する 頂点の数 弧の数を柔軟に変える必要あり グラフ探索など リンクをたどる必要あり オブジェクト指向言語が向いている オブジェクト数の柔軟な変更 再帰的関数 メソッド リストなどの豊富なライブラリ java.util.vector など 使い易い開発環境 プロジェクト管理 クラス管理 GUI
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新版明解C言語 実践編
2 List - "max.h" a, b max List - max "max.h" #define max(a, b) ((a) > (b)? (a) : (b)) max List -2 List -2 max #include "max.h" int x, y; printf("x"); printf("y"); scanf("%d", &x); scanf("%d", &y); printf("max(x,
More informationJavaScript の使い方
JavaScript Release10.5 JavaScript NXJ JavaScript JavaScript JavaScript 2 JavaScript JavaScript JavaScript NXJ JavaScript 1: JavaScript 2: JavaScript 3: JavaScript 4: 1 1: JavaScript JavaScript NXJ Static
More information@(h) Select.vb ver 1.1 ( 07.09.15 ) @(h) Select.vb ver 1.0 ( 07.09.13 ) @(s) Option Explicit Private Structure SYMBOLINFO Dim SyDataType As String Dim
A HotDocument A HotDocument A HotDocument A HotDocument A HotDocument A HotDocument A HotDocument A HotDocument @(h) Select.vb ver 1.1 ( 07.09.15 ) @(h) Select.vb ver 1.0 ( 07.09.13 ) @(s) Option Explicit
More informationI. Backus-Naur BNF S + S S * S S x S +, *, x BNF S (parse tree) : * x + x x S * S x + S S S x x (1) * x x * x (2) * + x x x (3) + x * x + x x (4) * *
2015 2015 07 30 10:30 12:00 I. I VI II. III. IV. a d V. VI. 80 100 60 1 I. Backus-Naur BNF S + S S * S S x S +, *, x BNF S (parse tree) : * x + x x S * S x + S S S x x (1) * x x * x (2) * + x x x (3) +
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 informationpptx
iphone 2010 8 18 C xkozima@myu.ac.jp C Hello, World! Hello World hello.c! printf( Hello, World!\n );! os> ls! hello.c! os> cc hello.c o hello! os> ls! hello!!hello.c! os>./hello! Hello, World!! os>! os>
More information8 / 0 1 i++ i 1 i-- i C !!! C 2
C 2006 5 2 printf() 1 [1] 5 8 C 5 ( ) 6 (auto) (static) 7 (=) 1 8 / 0 1 i++ i 1 i-- i 1 2 2.1 C 4 5 3 13!!! C 2 2.2 C ( ) 4 1 HTML はじめ mkdir work 作業用ディレクトリーの作成 emacs hoge.c& エディターによりソースプログラム作成 gcc -o fuga
More information解きながら学ぶC++入門編
!... 38!=... 35 "... 112 " "... 311 " "... 4, 264 #... 371 #define... 126, 371 #endif... 369 #if... 369 #ifndef... 369 #include... 3, 311 #undef... 371 %... 17, 18 %=... 85 &... 222 &... 203 &&... 40 &=...
More information#include <stdio.h> 2 #include <stdlib.h> 3 #include <GL/glut.h> 4 Program 1 (OpenGL GameSample001) 5 // 6 static bool KeyUpON = false; // 7 sta
1 1. 1 #include 2 #include 3 #include 4 Program 1 (OpenGL GameSample001) 5 // 6 static bool KeyUpON = false; // 7 static bool KeyDownON = false; // 8 static bool KeyLeftON
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 informationALG ppt
2012614 (sakai.keiichi@kochi-tech.ac.jp) http://www.info.kochi-tech.ac.jp/k1sakai/lecture/alg/2012/index.html 1 2 2 3 29 20 32 14 24 30 48 7 19 21 31 4 N O(log N) 29 O(N) 20 32 14 24 30 48 7 19 21 31 5
More information平成 29 年度卒業研究 初心者のためのゲームプログラミング用 教材の開発 函館工業高等専門学校生産システム工学科情報コース 5 年 25 番細見政央指導教員東海林智也
平成 29 年度卒業研究 初心者のためのゲームプログラミング用 教材の開発 函館工業高等専門学校生産システム工学科情報コース 5 年 25 番細見政央指導教員東海林智也 目次 第 1 章英文アブストラクト第 2 章研究目的第 3 章研究背景第 4 章開発環境第 5 章開発した 2D ゲーム制作ライブラリの概要第 6 章ライブラリの使用方法第 7 章まとめと今後の課題参考文献 1 第 1 章英文アブストラクト
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 informationObjective Caml 3.12 Jacques Garrigue ( ) with Alain Frisch (Lexifi), OCaml developper team (INRIA)
Objective Caml 3.12 Jacques Garrigue ( ) http://www.math.nagoya-u.ac.jp/~garrigue/ with Alain Frisch (Lexifi), OCaml developper team (INRIA) Jacques Garrigue Modules in Objective Caml 3.12 1 Objective
More informationGRAPE GRAPE-DR V-GRAPE
GRAPE-DR / 2006/11/20-22 GRAPE GRAPE-DR V-GRAPE http://antwrp.gsfc.nasa.gov/apod/ap950917.html ( ) SDSS Genzel et al 2003 Adaptive Optics SgrA ( ) 12 1 : GRAPE : (Barnes-Hut tree, FMM, Particle- Mesh
More informationI. (i) Foo public (A). javac Foo.java java Foo.class (C). javac Foo java Foo (ii)? (B). javac Foo.java java Foo (D). javac Foo java Foo.class (A). Jav
2018 06 08 11:00 12:00 I. I III II. III. IV. ( a d) V. VI. 80 40 40 100 60 : A ActionListener aa addactionlistener AE ActionEvent K KeyListener ak addkeylistener KE KeyEvent M MouseListener am addmouselistener
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 informationexec.dvi
2018 c 6, Mini-C C++ 6211 611, 61, print,,, (run ),,, (int ), 7, x, x "a" 3 "b" 4 "x" 10 (, ), x STL map 1 + 2, 1 2,, x = ;, 1, 2 x { 1 ; 2 ; ; m, if ( ) { 1 else { 2, 1,, 2 0, 1, 3 0, 2,,, main 6 1 ,,
More information1. ( ) SPH 1. 1: 2: 2.
SPH 2014/08/06 2014 1. ( ) 2. 3. 4. SPH 1. 1: 2: 2. 1. ( ) 2. 3. 4. MPI SIMD : 1. MPI : 2. ( ) MPI : ( ) : DRY (Don t Repeat Yourself) ( ) : DRY (Don t Repeat Yourself) ( 2014 7 ) (SPH MPS MLS ) ( : Tree,
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 information