Skip to content

Instantly share code, notes, and snippets.

@jayemerson
Created July 14, 2011 01:37
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save jayemerson/1081713 to your computer and use it in GitHub Desktop.
What am I missing with the FixedFloatArray?
sub mean2(*@args) {
# This works, but is Resizable:
#my $vec := pir::new("ResizableFloatArray");
# This works, but... argh.
my $vec := Q:PIR { %r = new ["FixedFloatArray"], 2 };
#my $vec := pir::new("FixedFloatArray", 2);
# Generates: "init_pmc() not implemented in class 'FixedFloatArray'"
$vec[0] := 1.234;
$vec[1] := 5.678;
return $vec[0] + $vec[1];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment