Sunday, May 25, 2014

1st week of GSOC

This week I've got back into the swing of things, and have gotten tests  worked on.

  • For m3d, tests for addition and subtraction are complete, and hadamard needs to be tested.
    • Addition and subtraction are tested by adding variable a to b, writing the result to c, then subtracting c from b and writing that result to variable d.   Variable d is tested for equality to a.    
  • For m5d and m7d, tests are still a work in progress, hadamard needs to be finalized.
    • A big issue had been remembering which representation was which and a confusion I had when communicating, over which bit was on which bitslice.

A large amount of the milestone needs to be finished, which at this point is mostly tests, which has more or less logic errors.    The next week, I have laid out much better, with a clear vision of how how tests will work, relying on the communicative and associative property.

Thursday, May 22, 2014

GF(7) Elementwise multiplication needs further optimization.

I used a  logic friday boolean logic optimization software to attempt to find an optimal set  element wise multiplication (Hadamard).   Unfortunately, this yielded disappointing results for the moment, not less than 70 bit operations.   Possible ways to optimize include temporary bit slice during multiplication.   This would mean that for the duration of the equation, the elements could be operated on as if they had four bits instead of three.   Such as was first suggested here http://arxiv.org/abs/0901.1413 for GF(5), though a better representation has since been found for GF(5).

Tuesday, May 13, 2014

Submatrices, Addition, Subtraction, and Hadamard

The first major milestone of this project will be coding and setting up tests for the major building blocks of any feasible Matrix library.   To start, wrappers for rand, free, and other essential library functions, will be worked on.Basic  functions like m1ri_rand, and  m1ri_free, have not appeared to any problems at this point, and seam to be working well.

  Arithmetic in the form of element wise addition and  multiplication (Hadamard Multiplication)  is the first major area that is needing worked on.   For GF(3), referred to as m3d, hadamard is implimented as element wise multiplication in that representation is trivial, taking 3 bit operations, half as many as is required for vector addition.    GF(5), and GF(7) on the other hand, optimized in their representations for addition and traditional matrix multiplication, Boolean expression for element wise multiplication still found.   

   Tests with Autotools are an area that needs work, while simple benchmarks have been used, they've always been written on the fly and edited soon afterwards, and the current "tests" will succeed as long as the program doesn't have any syntax errors.    To improve upon this, tests that check for logic errors with a pass fail on the aforementioned functions will be written in the following .   Throughout this summer, testing for logic errors will be be a major theme of the project.   This not only will make further work easier to build off of but will add to its legitimacy.