Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Tue, 27 Aug 2013 04:07:03 -0400
From: Yaniv Sapir <>
Subject: Re: Parallella: bcrypt

On Wed, Jul 31, 2013 at 5:25 PM, Katja Malvoni <> wrote:

> Yaniv, how should I use two separate structs? In matmul example, only one
> is used. I tried allocating memory with size of both struct and I was
> hoping that if I put both in "shared_dram" they would be placed one after
> another. But that wasn't the case. I used e-read -1 1000000 10000 and I
> haven't found the other struct (I was searching for correct results and
> done flags which are very easy to spot or for 320 bytes of zeroes in case
> that something went wrong and nothing was written).

Do you mean allocating from the host on the EMEM or allocating on the
device program?

If the former, then e_alloc() lets you explicitly place your buffers
wherever you want, relative to the base of the EMEM.

For the latter, you can use the SECTION() attribute to place more than one
buffer in a section (as you surely know). Buffers will be allocated
adjacent to eachother (up to alignment considerations). Use objdump to get
their exact placement in order to refer to them from the host.

Alternatively, you can crate a custom LDF file with new sections placed in
explicit addresses, then use the SECTION() attribute to locate the objects
in these sections. The matmul example has a custom LDF for this purpose.

Yet another alternative (and the simplest one, IMO) is to use pointers
instead of static allocation of objects. You initialize the pointer to the
required address and refer to the struct members by the "->" operator.

Yaniv Sapir
Adapteva Inc.
1666 Massachusetts Ave, Suite 14
Lexington, MA 02420
Phone: (781)-328-0513 (x104)
CONFIDENTIALITY NOTICE: This e-mail may contain information
that is confidential and proprietary to Adapteva, and Adapteva hereby
designates the information in this e-mail as confidential. The information
 intended only for the use of the individual or entity named above. If you
not the intended recipient, you are hereby notified that any disclosure,
distribution or use of any of the information contained in this
transmission is
strictly prohibited and that you should immediately destroy this e-mail and
contents and notify Adapteva.

Content of type "text/html" skipped

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.