rgb's Books

Robert G. Brown's General Tools Page

Things on the site itself that may be of interest to students or philosophers of any age or generation include complete online books of poetry, various support materials for the study of physics, and links related to beowulfery. All materials on this site that are authored by Robert G. Brown are Copyright 2004. The details of their Open Public License (modified) can be viewed here. If you use or enjoy anything at all on this site -- free textbooks, stories, programs, or other resources, consider hitting to help spread the word so others can find it as well. Note, Robert G. Brown is generally either rgb or rgbatduke on many external sites crosslinked here.


My Books:

My Books


Home Top Flashcard Program DieHarder Program Benchmaster Program Jove (editor) Program The C Book The Tao of Programming Your Brain: a User's Manual (draft) CVS Mini Howto
C project template PVM project template LaTeX project template HOWTO project template Latex Manual (online) random_pvm demo/template The yum HOWTO (draft) Yum Article Contact About
Amazon Sales Rank Toolset A Theorem Concerning God

Site Links


Home

Home
Lilith
Class
Beowulf
Research
General
Poetry
Prose
Philosophy
Search
Contact
About

Webalyze

Home
Class
Beowulf
Research
General
Poetry
Prose
Philosophy

Misc

Brahma
(webalize)
DBUG
(webalize)
DULUG
Linux@Duke

tensor_test

by
Robert G. Brown
Duke University Physics Department
Durham, NC 27708-0305
Copyright Robert G. Brown, 2014


Abstract

tensor_test is a development/test wrapper for a proposed tensor extension of the GSL. Some of the changes it institutes are fairly serious, although it would be possible to implement it with less impact.

  • The gsl block is redefined so that it is (also) a gsl vector. Before a vector was a block with an owner. Now a block is a block with an owner, and there is no separate "vector" quantity.
  • The gsl matrix is redefined so that it can have any rank from 1 (vector) to 8. It contains lower, upper, and length vectors (each of length equal to the rank of the matrix) that contain the lower and upper bounds of the matrix indices and the over index length. The key feature of the matrix object is the void* matrix->mptr pointer, which can be packed with data addresses from a block and cast to whatever type pointer you like. This permits ALL MATRICES to be addressed in the form m[i][j]...[l][m].
  • A gsl tensor is defined to be a matrix and an associated data block whose addresses are packed into the matrix-mptr pointer. It can be created or freed with a single command. However, blocks and matrices can be created and freed separately as well, and (for example) several matrices can refer to the same block or different parts of the same block. Freeing a matrix does not free the underlying data block; freeing a tensor does.

At the moment, the code passes at least one elementary set of tests; the block can be loaded as a straight vector with data elements which can then be successfully referenced by matrix address. In verbose mode, the test code also traces fairly explicitly the memory allocations and freeings (which is still not a guarantee that the code cannot leak or segvec fault). Still, it SEEMS to work out to 8th rank tensors for fairly arbitrary index limits.



Contents

Document TypeSize (K)Last Modified
tensor_test/tensor_test-0.0.2-1.src.rpm 27
11/13/13
tensor_test/tensor_test-0.0.2-1.x86_64.rpm 15
11/13/13
tensor_test/tensor_test.i386.rpm 13
11/13/13
tensor_test/tensor_test.src.rpm 27
11/13/13
tensor_test/tensor_test-0.0.2.tgz 24
11/13/13
tensor_test/tensor_test.tgz 24
11/13/13
License Info

The documents linked from this page are all provided under a modified Gnu License appropriate for the document type (OPL for text, GPL for software/source). Please read the relevant license(s) before redistributing the document(s) in any form -- an explicit agreement with the author is required for certain kinds of for-profit redistributions. In all cases the license makes the documents generally available for unlimited personal use and non-profit distributions (for example, linking or posting copies on a website, distributing paper copies to a class for free or at cost).

The author cherishes feedback. If you like or dislike the document(s) and would like to say so, wish to redistribute a version in any medium to be sold at a profit, would like to contribute or comment on material, or just want to say hi, feel free to contact the author

Home Top Flashcard Program DieHarder Program Benchmaster Program Jove (editor) Program The C Book The Tao of Programming Your Brain: a User's Manual (draft) CVS Mini Howto
C project template PVM project template LaTeX project template HOWTO project template Latex Manual (online) random_pvm demo/template The yum HOWTO (draft) Yum Article Contact About
Amazon Sales Rank Toolset A Theorem Concerning God

This page is maintained by Robert G. Brown: rgb@phy.duke.edu