This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RT_PROGRAM void closest_hit_radiance1() { | |
float3 world_geo_normal = normalize(rtTransformNormal( RT_OBJECT_TO_WORLD, geometric_normal)); | |
float3 world_shade_normal = normalize(rtTransformNormal( RT_OBJECT_TO_WORLD, shading_normal)); | |
float3 ffnormal = faceforward(world_shade_normal, | |
-ray.direction, | |
world_geo_normal); | |
float3 color = Ka * ambient_light_color; | |
float3 hit_point = ray.origin + t_hit * ray.direction; | |
for(int i = 0; i < lights.size(); ++i) { | |
BasicLight light = lights[i]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rtDeclareVariable( float4, sphere, , ); | |
rtDeclareVariable( optix::Ray, ray, rtCurrentRay, ); | |
rtDeclareVariable( float3, normal, attribute normal ); | |
RT_PROGRAM void intersect_sphere( int prim_index ) { | |
float3 center = make_float3( sphere.x, sphere.y, sphere.z ); | |
float radius = sphere.w; | |
float3 O = ray.origin - center; | |
float b = dot( O, ray.direction ); float c = dot( O, O ) - radius*radius; float disc = b*b - c; | |
if( disc > 0.0f ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ida pro | |
Metasploit | |
Mac internals | |
Autoconf | |
Go internals | |
Write compiler | |
Heap feng shuei | |
Jit spray | |
Windbg | |
Dynamic reversing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* compile with ocamlfind ocamlopt dfs.ml -package ocamlgraph -linkpkg -package batteries *) | |
let filename_ = ref "temp.dot" | |
let start_ = ref "a" | |
let () = | |
Arg.parse | |
["-f", Arg.Set_string(filename_), "Filename"; | |
"-s", Arg.Set_string(start_), "Starting vertex"] | |
(fun _ -> ()) | |
"Usage: dfs <options>" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ svn diff | |
Index: src/dot.ml | |
=================================================================== | |
--- src/dot.ml (revision 453) | |
+++ src/dot.ml (working copy) | |
@@ -147,15 +147,15 @@ | |
let al = Attr.addl !def_edge_attr al in | |
let el = L.edge [Attr.list al] in | |
let g,vn = node g id [] in | |
- List.fold_left |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ grep -i -E "(alloc|heap)" * | |
asplos2000.titles:Power Aware Page Allocation. | |
asplos2000.titles:Hoard: A Scalable Memory Allocator for Multithreaded Applications. | |
asplos2006.titles:Comprehensively and efficiently protecting the heap. | |
asplos2006.titles:HeapMD: identifying heap-based bugs using anomaly detection. | |
asplos2010.titles:Shoestring: probabilistic soft error reliability on the cheap. | |
asplos2011.titles:NV-Heaps: making persistent objects fast and safe with next-generation, non-volatile memories. | |
asplos2012.titles:DejaVu: accelerating resource allocation in virtualized environments. | |
isca2001.titles:Dynamically allocating processor resources between nearby and distant ILP. | |
isca2002.titles:Avoiding Initialization Misses to the Heap. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type loop_type = Self | Irreducible | Reducible | Nonheader | |
let analyze_loops g = | |
let uf = UF.init () in | |
let types = H.create 1337 in | |
let headers = H.create 1337 in | |
let preds = H.create 1337 in | |
let dfs_tree = DfsTree.create g in | |
let is_ancestor = DfsTree.isAncestor dfs_tree in | |
let compute_preds w = G.fold_pred (fun v (bp,nbp) -> if is_ancestor w v |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File "sreedhar.ml", line 30, characters 62-63: | |
Error: This expression has type G.V.t but an expression was expected of type | |
DJG.V.t | |
make: *** [sreedhar.cmx] Error 2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File "temp.ml", line 4, characters 2-5: | |
Error: Syntax error |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module DJV = struct | |
type t = { level: int; vertex: string } | |
let vertex v = v.vertex | |
let level v = v.level | |
end | |
let _ = print_string (DJV.vertex DJV.({ level=0; vertex="hello, world\n" })) |