def __indices_setup__(cls, **kwargs): try: return as_tuple(kwargs['dimensions']), as_tuple(kwargs['dimensions']) except KeyError: nthreads = kwargs['nthreads_std'] dim = CustomDimension(name='wi', symbolic_size=nthreads) return (dim,), (dim,)
def __new__(cls, nthreads): return CustomDimension.__new__(cls, name='tid', symbolic_size=nthreads)