void-packages/srcpkgs/j/patches/fix-cip.c-includes.patch
Đoàn Trần Công Danh 1a06b0d5d7 srcpkgs/j*: convert patches to -Np1
```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

34 lines
978 B
Diff

--- a/jsrc/cip.c 2020-01-30 13:31:22.463687182 +0900
+++ b/jsrc/cip.c 2020-01-30 13:33:47.707458248 +0900
@@ -3,9 +3,9 @@
/* */
/* Conjunctions: Inner Product */
-#include "../../jsource/jsrc/j.h"
-#include "../../jsource/jsrc/vasm.h"
-#include "../../jsource/jsrc/gemm.h"
+#include "j.h"
+#include "vasm.h"
+#include "gemm.h"
#define MAXAROWS 384 // max rows of a that we can process to stay in L2 cache a strip is m*CACHEHEIGHT, z strip is m*CACHEWIDTH this is wired to 128*3 - check if you chage
@@ -1057,15 +1057,15 @@
switch(c){
case CPLUSDOT:
#define F |=
-#include "../../jsource/jsrc/cip_t.h"
+#include "cip_t.h"
break;
case CSTARDOT:
#define F &=
-#include "../../jsource/jsrc/cip_t.h"
+#include "cip_t.h"
break;
case CNE:
#define F ^=
-#include "../../jsource/jsrc/cip_t.h"
+#include "cip_t.h"
break;
}
R z;