Skip to content

Instantly share code, notes, and snippets.

@cronin101
Created March 23, 2014 20:01
Show Gist options
  • Save cronin101/9728987 to your computer and use it in GitHub Desktop.
Save cronin101/9728987 to your computer and use it in GitHub Desktop.
rpsec --format documentation
Hadope
Showcasing features
can complete an Integer pipeline computation
can complete a Double pipeline computation
returns the correct result
can #zip and #braid
Top level namespace
is defined
Devices
defines a Device superclass
defines a CPU device
Tasks
defines a TaskQueue
defines a Task superclass
defines a Map task
Hadope::TaskKernelGenerator
can be initialized with a task
Map tasks
can generate the kernel from components and boilerplate
Filter tasks
can generate the kernel from components and boilerplate
Scan tasks
can generate the kernel from components and boilerplate
Braid tasks
can generate the kernel from components and boilerplate
Sort tasks
can generate the kernel from components and boilerplate
Undefined tasks
should raise an error when asked to generate the kernel for an undefined task type
Hadope::CPU
is a singleton if accessed using ::get
can succesfully load an integer dataset
can successfully pin an integer dataset
can succesfully retrieve an integer dataset
can successfully retrieve a pinned integer dataset
allows loading and retrieving via square-bracket syntax
Hadope::Device
is abstract
defines transferring an object to device memory
defines retrieving an integer array from device memory
creates a task queue when initialized
allows the output to be retrieved by 'casting' to a Ruby type
caches the loaded dataset when no mutating changes are made
caches the retrieved dataset when no mutating changes are made
can compute the summation of an integer buffer
can count the number of occurrences of a number in an integer buffer
#map
is defined
causes a task to be queued
Hadope::GPU
is a singleton if accessed using ::get
can succesfully load an integer dataset
can successfully pin an integer dataset
can succesfully retrieve an integer dataset
can successfully retrieve a pinned integer dataset
allows loading and retrieving via square-bracket syntax
#<Hadope::LoggerSingleton:0x007f9f4c2eec10>
is a singleton if accessed using constant
can be set to loud mode
can be set to quiet mode
Hadope::LambdaBytecodeParser
disassembles an anonymous function by inspecting RubyVM bytecode
extracts the performed arithmetic operations in Reverse Polish Notation
converts anonymous functions into C expressions using Infix Notation
parsing Ruby bytecode
understands the + operator
understands the - operator
understands the * operator
understands the / operator
understands the % operator
understands the > operator
understands the < operator
understands the <= operator
understands the >= operator
understands the == operator
understands the != operator
can handle negative numbers
can handle two arguments
can beta-reduce bound variables referenced within closure
recognises when a bytecode operation is not currently defined
recognises when a bytecode operation is an object method call not currently defined
can handle negation
can handle method-sending #even?
Hadope::Filter
cannot be created with no predicate
can be created with a predicate
Hadope::Map
can be created with no statements
can be created with a single statement
can be created with multiple statements
#fuse!
should create a pipelining variable when one is needed
should not create a pipelining variable when one is not needed
Hadope::Scan
can be created with no arguments and will default to exclusive prefix-sum
Hadope::Task
is abstract
can have a single statement added
can have multiple statements added
Hadope::TaskQueue
initializes with an empty queue of tasks
#simplify!
can be called when there are no tasks
should leave the queued tasks alone when they are not combinable
can be called when there is only one task
with consecutive map tasks
will perform map fusion
with a map task followed by a filter task
will perform map-filter fusion
with a filter task followed by a map task
will perform map-filter fusion
with a map task followed by a mapfilter
will prepend the map statements to the mapfilter
with a mapfilter task followed by a map
will append the map statements to the mapfilter
Array
has monkey-patched index-access syntax to shortcut device loading
doesn't allow classes without a conversion method defined to be cast
still allows the classic behaviour of index-access
Double
defines how to convert from the Ruby Float type to C Doubles
File
has monkey-patched index-access syntax to shortcut device loading
Fixnum
defines how to convert from the equivalent C type (Int)
Float
defines how to convert from the equivalent C type (double)
Int
defines how to convert from the Ruby Fixnum type to C Ints
Finished in 0.09261 seconds
92 examples, 0 failures
Coverage report generated for RSpec to /Users/cronin/Dev/Ruby/HaDope/coverage. 963 / 1056 LOC (91.19%) covered.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment