Ticket #71 (closed enhancement: fixed)

Opened 2 months ago

Last modified 2 months ago

Support for contiguous modes in buffers

Reported by: dagss Assigned to: dagss
Priority: minor Milestone: 0.10
Component: Code Generation Version:
Keywords: numerics buffers Cc:

Description

Want to support C and Fortran contiguous modes for buffers. This can be used to optimize indexing of one dimensions -- something which can potentially be important in some 1D usecases (at least it will stop users from doing other things in such situations when one simply wants to be as fast as possible).

Implementation is nearly done for this.

Change History

(follow-up: ↓ 2 ) 09/16/2008 02:09:42 PM changed by dagss

  • status changed from new to assigned.

To be clearer, if mode="c" then the lookup formula will be

(dtype*)((char*)buf + strides[0] * indices[0] + ... + strides[p-1] * indices[p-1]) + indices[p]

(in reply to: ↑ 1 ) 09/16/2008 02:10:42 PM changed by dagss

Replying to dagss:

To be clearer, if mode="c" then the lookup formula will be {{{ (dtype*)((char*)buf + strides[0] * indices[0] + ... + strides[p-1] * indices[p-1]) + indices[p] }}}

That should be p-2 rather than p-1, where p is ndim. Sigh. Nobody is probably reading this anyway :-)

09/17/2008 03:58:37 AM changed by dagss

  • status changed from assigned to closed.
  • resolution set to fixed.
  • component changed from Build System to Code Generation.