-
-
Save Bajena/64f6c0e767c8410511d1b00765dde9b8 to your computer and use it in GitHub Desktop.
This file contains 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
#include "ruby/ruby.h" | |
#include "matrices.h" | |
static VALUE inv_matrix(VALUE self, VALUE m) { // We'll implement it later } | |
static VALUE mul_matrix(VALUE self, VALUE m1, VALUE m2) { // We'll implement in later } | |
void Init_extension(void) { | |
VALUE MatrixBoost = rb_define_module("MatrixBoost"); | |
VALUE NativeHelpers = rb_define_class_under(MatrixBoost, "NativeHelpers", rb_cObject); | |
rb_define_singleton_method(NativeHelpers, "mul_matrix", mul_matrix, 2); | |
rb_define_singleton_method(NativeHelpers, "inv_matrix", inv_matrix, 1); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment