On Wednesday, 6 September 2023 at 12:15:02 UTC, Adam D Ruppe
wrote:
On Wednesday, 6 September 2023 at 12:04:40 UTC, d007 wrote:
extern(C) int test(ref scope const(ubyte)[32] b);
extern(C) int test(ref scope const(ubyte[32]) b);
These are the same thing since the ref cannot be rebound
anyway
On Wednesday, 6 September 2023 at 12:04:40 UTC, d007 wrote:
extern(C) int test(ref scope const(ubyte)[32] b);
extern(C) int test(ref scope const(ubyte[32]) b);
These are the same thing since the ref cannot be rebound anyway;
a static array just is its contents.
```d
extern(C) int test(ref scope const(ubyte)[32] b);
```
This will automatic become this in ctfe relection
```d
extern(C) int test(ref scope const(ubyte[32]) b);
```
LDC2 1.34.0 DMD v2.104.2
On Monday, 17 February 2020 at 20:08:24 UTC, Adnan wrote:
On Monday, 17 February 2020 at 14:34:44 UTC, Simen Kjærås wrote:
On Monday, 17 February 2020 at 14:04:34 UTC, Adnan wrote:
//
All in all, I end up with this code:
module strassens_matmul
package {
T[][] mulIterative(T)(const T[][]
On Monday, 17 February 2020 at 14:34:44 UTC, Simen Kjærås wrote:
On Monday, 17 February 2020 at 14:04:34 UTC, Adnan wrote:
//
All in all, I end up with this code:
module strassens_matmul
package {
T[][] mulIterative(T)(const T[][] mat1, const T[][] mat2) {
auto result = createMatr
rror: template instance
strassens_matmul.getPointPtr!uint error instantiating
source/strassens_matmul.d(48,29):
I'd just finished writing a long post explaining the stuff you've
apparently figured out. Ah well. :p
In this case, getPointPtr return T*, but takes scope const ref
[][] mat, ulong row, ulong column, scope
const T value) {
mat[row][column] = value;
}
On Monday, 17 February 2020 at 13:44:55 UTC, Adnan wrote:
https://ideone.com/lVi5Uy
module strassens_matmul;
debug {
static import std;
}
...
Okay I changed to
module strassens_matmul;
debug {
static import std;
}
package {
ulong getRowSize(T)(scope const T[][] mat
long
column) {
return mat[row][column];
}
T[][] mulIterative(T)(scope const T[][] mat1, scope const
T[][] mat2) {
auto result = createMatrix!T(mat1.getRowSize,
mat2.getColumnSize);
foreach (row; 0 .. mat1.getRowSize()) {
foreach (column; 0 ..
Jarrett Billingsley Wrote:
> On Sat, Apr 11, 2009 at 5:33 AM, Kagamin wrote:
> > If "in" is equivalent to "scope const". What "scope" means? Does it mean
> > that this argument doesn't escape scope of this function? Then "const"
On Sat, Apr 11, 2009 at 5:33 AM, Kagamin wrote:
> If "in" is equivalent to "scope const". What "scope" means? Does it mean that
> this argument doesn't escape scope of this function? Then "const" parameters
> are not quite equivalent to &q
If "in" is equivalent to "scope const". What "scope" means? Does it mean that
this argument doesn't escape scope of this function? Then "const" parameters
are not quite equivalent to "in" parameters.
12 matches
Mail list logo