]> git.djapps.eu Git - pkg/ggml/sources/ggml/commitdiff
ggml : fix docs about element access (close #348)
authorGeorgi Gerganov <redacted>
Mon, 10 Jul 2023 19:05:13 +0000 (22:05 +0300)
committerGeorgi Gerganov <redacted>
Mon, 10 Jul 2023 19:05:36 +0000 (22:05 +0300)
include/ggml/ggml.h

index ab84bef68747e00a0a6c5e8eecbe89eb11b86bbd..4993a06034d24757af2c5b01a95317a5b8087e9d 100644 (file)
 //   {
 //       struct ggml_tensor * a = ggml_new_tensor_2d(ctx, GGML_TYPE_F32, 2, 3);
 //
-//       // a[1, 2] = 1.0f;
+//       // a[2, 1] = 1.0f;
 //       *(float *) ((char *) a->data + 2*a->nb[1] + 1*a->nb[0]) = 1.0f;
 //
-//       // a[2, 0] = 2.0f;
+//       // a[0, 2] = 2.0f;
 //       *(float *) ((char *) a->data + 0*a->nb[1] + 2*a->nb[0]) = 2.0f;
 //
 //       ...