summaryrefslogtreecommitdiff
path: root/functions.c
diff options
context:
space:
mode:
authorPeter Mikkelsen <petermikkelsen10@gmail.com>2022-01-26 13:00:39 +0000
committerPeter Mikkelsen <petermikkelsen10@gmail.com>2022-01-26 13:00:39 +0000
commit7f66d444451dab0e831cc0f14cc77ad691936f42 (patch)
tree99317b43b795d040c78490769738ef0171168e7d /functions.c
parenta328d13015fc4cbe34d99ddcfd36754e860dac00 (diff)
Implement inner product . and outer product ⌾
Diffstat (limited to 'functions.c')
-rw-r--r--functions.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/functions.c b/functions.c
index c4b5cee..0e302de 100644
--- a/functions.c
+++ b/functions.c
@@ -426,11 +426,9 @@ fnMix(Array *right)
int *index = malloc(sizeof(int) * commonrank);
int offset;
for(i = 0; i < size/commonsize; i++){
- print("COPY CELL %d\n", i);
Array *a = right->arraydata[i];
Array *fill = fillelement(a);
if(a->rank == 0){
- print("Copy scalar :-)\n");
memcpy(
result->rawdata + i * commonsize * datasizes[a->type],
a->rawdata, datasizes[a->type]);
@@ -461,7 +459,6 @@ fnMix(Array *right)
index[commonrank-2-k]++;
}
if(offset < commonsize){
- print("Copying from %d to %d\n", j, commonsize*i+offset);
memcpy(
result->rawdata + (i * commonsize + offset) * datasizes[a->type],
a->rawdata + j * datasizes[a->type], datasizes[a->type]);
@@ -482,7 +479,7 @@ fnMix(Array *right)
Array *
fnSplit(Array *right)
{
- Rune *code = L"0≡≢⍴⍵: ⍵ ⋄ (⊂⍵)⌷⍨¨⍳≢⍵";
+ Rune *code = L"0≡≢⍴⍵: ⍵ ⋄ 1≡≢⍴⍵: ⊂⍵ ⋄ (⊂⍵)⌷⍨¨⍳≢⍵";
return rundfn(code, nil, nil, nil, right);
}