Implement matrix multiplication C = A * B on the GPU using shared-memory tiling.
A is an M x K matrix, B is a K x N matrix, and C is the resulting M x N matrix, all stored in row-major order as flat arrays of float.
Write a CUDA __global__ kernel that computes the product efficiently by loading tiles of A and B into shared memory, and a host function solve that allocates device memory, copies the inputs to the device, launches the kernel, copies the result back, and frees device memory.
The pointers A, B, and C passed to solve are HOST pointers.
Function signature:
void solve(const float* A, const float* B, float* C, int M, int N, int K);