.. XObjects documentation master file, created by sphinx-quickstart on Thu Apr 8 23:39:24 2021. You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. Welcome to XObjects's documentation! ==================================== .. toctree:: :maxdepth: 2 :caption: Contents: XObjects is a library to create and manipulate serialized object in CPU and GPU memory efficiently in Python and C. Example (tentative) .. code-block:: python import xobjects as xo import numpy as np class Point(xo.Struct): x=xo.Float64 y=xo.Float64 z=xo.Float64 class Polygon(xo.Struct): point = Point[:] edge = xo.Int64[:,2] get_length = xo.Method( source=""" #include double dist(Point a, Point b){ double dx=Point_get_x(b)- Point_get_x(a); double dy=Point_get_y(b)- Point_get_y(a); double dz=Point_get_z(b)- Point_get_z(a); return sqrt(dx*dx+dy*dy+dz*dz); } double get_length(Polygon self){ double length=0; for (int ii; ii